Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

System.Xml.XmlTextReader

Thread Tools
 
Search this Thread
 
Old 08 January 2007, 10:08 AM
  #1  
David_Wallis
Scooby Regular
Thread Starter
 
David_Wallis's Avatar
 
Join Date: Nov 2001
Location: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Posts: 15,239
Likes: 0
Received 1 Like on 1 Post
Default System.Xml.XmlTextReader

Is there a way of counting elements within this??

Or a for each element in..

Im currently doing:

Code:
Dim reader As New System.Xml.XmlTextReader(ResponseStream)
With reader
                .ReadToFollowing("a:href")
Blah blah..
What I then want to do is see if there are anymore a:href elements in the repsonse stream..

If that makes sense, which I suspect it doesnt..

Im sure its easy but I'm feeling like **** this morning with flu like problems

David
Old 08 January 2007, 10:13 AM
  #2  
Sub97
Scooby Regular
 
Sub97's Avatar
 
Join Date: Oct 2002
Posts: 809
Likes: 0
Received 0 Likes on 0 Posts
Default

Don't know anything about Xml, sorry mate. But can't you just do a nested loop?
Old 08 January 2007, 02:44 PM
  #3  
Jim_B
Scooby Regular
iTrader: (1)
 
Jim_B's Avatar
 
Join Date: Oct 2001
Location: Bristol
Posts: 508
Likes: 0
Received 0 Likes on 0 Posts
Default

Suppose you could have created an XPathDocument from the stream , called CreateNavigator on that and call the "Select" method on the navidator to filter the nodes you want.
Then you can do a "While(iter.MoveNext())" over the result set...
Old 08 January 2007, 03:54 PM
  #4  
David_Wallis
Scooby Regular
Thread Starter
 
David_Wallis's Avatar
 
Join Date: Nov 2001
Location: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Posts: 15,239
Likes: 0
Received 1 Like on 1 Post
Default

Ill have a look at both options, I'm up for a simple bodge though




All times are GMT +1. The time now is 02:41 PM.