Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XmlNodeReader

Status
Not open for further replies.

JHPeter

Programmer
Apr 17, 2003
8
GB
I would like to initialize a XmlNodeReader against a group of xml records in the "while" routine at the end of this code. Is this possible?

Dim xmlF As String = "../XMLFILE.xml"
Dim xpathDoc As XPathDocument = New XPathDocument(xmlF)
Dim xpathNav As XPathNavigator = xpDoc.CreateNavigator
Dim xmlNM As XmlNamespaceManager = New XmlNamespaceManager(xpathNav.NameTable)
xmlNM.AddNamespace("jl", "Dim xpExpr As XPathExpression = xpNav.Compile("/jl:XmlListing/listing [starts-with(state,""" & stc & """)]")
xpExpr.SetContext(xmlNM)

Dim xpNodeIt As XPathNodeIterator = xpNav.Select(xpExpr)
xpNodeIt.Current.MoveToRoot()
xpNodeIt.Current.MoveToFirstChild()

While (xpNodeIt.MoveNext())
Dim newNR As XmlNodeReader = New XmlNodeReader(?)
While (newNR.Read())

Any suggestions gratefully received.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top