Dim fn As String = "c:\joy\linkage.xml"
Dim doc As XPathDocument = New XPathDocument(fn)
Dim nav As XPathNavigator = doc.CreateNavigator
Dim expr As XPathExpression = nav.Compile("set:distinct(/DocumentElement/tLinkage/link_key_2)")
Dim nt As Xml.XmlNameTable = doc.CreateNavigator.NameTable
expr.SetContext(New ExsltContext(nt))
Dim ni As XPathNodeIterator = nav.Select(expr)
For Each i In ni
Console.WriteLine(i.value)
Next
Thursday, March 19, 2009
Using xPath with Vb.NET
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment