473,385 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

XMLNodeReader question

Below is a part of my xml file returned from a webservice. Instead of
converting to a datatable and going through it a record at a time checking
if ClientCodeType = "Balloon_Type" and ClientCode = "R" to the OurCode of 3,
I want to use the XMLNodeReader to get that result back using MoveTo..
functions. My first of probably many question is how come this
XMLNodeReader has no attributes. I can not change the way the webservice
returns the string. Then, how do I use the MoveTo functions to get my 3
back? Thanks

<NewDataSet>
<Table1>
<OurCode>3</OurCode>
<ClientCode>B</ClientCode>
<ClientCodeType>Balloon_Type</ClientCodeType>
</Table1>
<Table1>
<OurCode>3</OurCode>
<ClientCode>R</ClientCode>
<ClientCodeType>Balloon_Type</ClientCodeType>
</Table1>
</NewDataSet>

Jan 31 '07 #1
1 1906
"WalterWalt" <,wrote in message
news:uH**************@TK2MSFTNGP06.phx.gbl...
Below is a part of my xml file returned from a webservice. Instead of
converting to a datatable and going through it a record at a time checking
if ClientCodeType = "Balloon_Type" and ClientCode = "R" to the OurCode of
3, I want to use the XMLNodeReader to get that result back using MoveTo..
functions. My first of probably many question is how come this
XMLNodeReader has no attributes. I can not change the way the webservice
returns the string. Then, how do I use the MoveTo functions to get my 3
back? Thanks

<NewDataSet>
<Table1>
<OurCode>3</OurCode>
<ClientCode>B</ClientCode>
<ClientCodeType>Balloon_Type</ClientCodeType>
</Table1>
<Table1>
<OurCode>3</OurCode>
<ClientCode>R</ClientCode>
<ClientCodeType>Balloon_Type</ClientCodeType>
</Table1>
</NewDataSet>
Not sure exactly what you mean but using selectNodes with XPath is easy:
/*/Table1/OurCode[../ClientCode = 'B' and ../ClientCodeType =
'Balloon_Type']
--

Joe Fawcett (MVP - XML)
http://joe.fawcett.name
Feb 2 '07 #2

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

Similar topics

3
by: Stevey | last post by:
I have the following XML file... <?xml version="1.0"?> <animals> <animal> <name>Tiger</name> <questions> <question index="0">true</question> <question index="1">true</question> </questions>
0
by: Brian Rogers | last post by:
To whom it may concern: Can anyone explain this behaviour in serialization and deserialization? I serialize an object using an XML serializer. I de-serialize the object from a StringReader and...
4
by: Andy Neilson | last post by:
I've run across a strange behaviour with XmlSerializer that I'm unable to explain. I came across this while trying to use XmlSerializer to deserialize from a the details of a SoapException. This...
1
by: Kris Desmadryl | last post by:
I want to loop all nodes of an xml file, because I want to search the content for a certain search pattern. I did something like this : reader = New XmlNodeReader(doc) While reader.Read() Select...
3
by: Ekqvist Marko | last post by:
Hi, I have one Access database table including questions and answers. Now I need to give answer id automatically to questionID column. But I don't know how it is best (fastest) to do? table...
4
by: David | last post by:
All I have an XML document as illustrated in the extract below. I am trying to use the XmlNodeReader to extract information from the document. What I am having trouble with is when I read the...
4
by: Samuel R. Neff | last post by:
I'm deserializing an XML file. If I pass a Stream to the file directly to the deserializer as follows it works fine: o = (New XmlSerializer( GetType(...
3
by: adhag | last post by:
Hi I am trying to parse through a large file in pieces using the xmlNodeReader. I only need it to be forward only and performance is the key but I am having a problem trying to get all the...
10
by: jambalapamba | last post by:
I am trying to skip element in xml document where style attribute is VISIBILITY: hidden or DISPLAY: none. In the following example i want to skip the last two elements but when i...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.