473,607 Members | 2,703 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XMLDOM - Parsing

I'm parsing an XML document using the XMLDOM object in ASP. I am
running into a problem with a section formatted like this:

<MasterElemen t>
TitleOfElement
<Abbreviation >
TOE
</Abbreviation>
</MasterElement>

If I use node.text, I get TitleOfElement TOE. I need to seperate the
two but cannot find any reference that addresses this. Of course I can
manually parse using standard functions like InStr, but it seems like
there should be a more proper way to extract the data. Anyone run into
this?

Thanks

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #1
1 2132
Looks like TitleOfElement TOE is a single value, so you can not separate
them using any in-built XMLDOM functions. Any XML parsing requires that the
values are somehow separated.

--
Manohar Kamath
Editor, .netBooks
www.dotnetbooks.com
"Mike Labman" <ml*****@omnite cinc.com> wrote in message
news:OS******** ******@TK2MSFTN GP11.phx.gbl...
I'm parsing an XML document using the XMLDOM object in ASP. I am
running into a problem with a section formatted like this:

<MasterElemen t>
TitleOfElement
<Abbreviation >
TOE
</Abbreviation>
</MasterElement>

If I use node.text, I get TitleOfElement TOE. I need to seperate the
two but cannot find any reference that addresses this. Of course I can
manually parse using standard functions like InStr, but it seems like
there should be a more proper way to extract the data. Anyone run into
this?

Thanks

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
18810
by: reclusive monkey | last post by:
I am just starting out with XML. I've been playing with XML and XSLT, very nice indeed. I particularly like the filtering/ordering functions. Anyway, I have started to have a look at scripting, and would like to use JavaScript as then I use Firefox as well as IE (tried some VBScript, fine in IE of course but no go in Firefox). I have copied an example from "XML Unleashed", but when I try it, I get the following error; A Runtime Error...
0
305
by: BCM | last post by:
In ASP 3, I once did a page using javascript and XMLDOM that loaded up xml files, displayed their data, and automatically refreshed that data at 10 second intervals (not a whole page refresh: just the data in the particular node I wanted to display). The javascript looked something like: function GetData() {
2
1978
by: jfizer | last post by:
I have a web app that uses a form with its fields populated from XML using Microsoft.XMLDOM. The problem is that Microsoft.XMLDOM functions seem to run on their own thread, so I dont know when the fields are done populating. Can anyone think of a way for me to check when the following function finishes? function importXML(xmlQuery,xmlSrc,xmlTarget) {
3
4265
by: Robert Zurer | last post by:
Hello all, I want to load an in-memory XmlDocument from the server to the client and create an XMLDOM object using javascript. I can do it from a url by calling this Javascript from the client. var xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async = "false"; xmlDoc.load("url of the persisted file");
8
3630
by: Mr. x | last post by:
Hello, How can I use xmlpath technogy by xmldom. (or there is another technique, but not xmldom). I need some code samples, please. Thanks :)
0
947
by: Robert Zurer | last post by:
Hello all, I want to load an in-memory XmlDocument from the server to the client and create an XMLDOM object using javascript. I can do it from a url by calling this Javascript from the client. var xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async = "false"; xmlDoc.load(url);
9
26838
by: B | last post by:
I have an XML string <?xml version="1.0" encoding="UTF-8"?> <SSOUser><Status>FAIL</Status><Message>Unable to find session id of 1137018716939</Message></SSOUser> That I am trying to retrieve the values between the tags for. I want to get the value from <Status>FAIL</Status>
2
5046
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I have the following code which I try to load an xml file, but in browser, I only get text value for each node, not whole xml string. I expect to see something like <name firstName="betty" lastName="Smith">I am at home</name> But I only see text "I am at home" did I do something wrong? Set xmlDom=CreateObject("Microsoft.XMLDOM") XMLDom.async =False
1
4206
AnuSumesh
by: AnuSumesh | last post by:
Hi, I want to read the text property of XML file. My xml file is as follows: <?xml version="1.0"?> <Domain_Credentials> <User> anu </User>
0
8049
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7985
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8469
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
5997
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5471
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3953
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4013
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1574
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1316
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.