Mega Code Archive

 
Categories / VB.Net / XML
 

XPathNavigator SelectSingleNode selects a single node in the XPathNavigator using the specified XPath query

Imports System Imports System.Xml Imports System.Xml.XPath Public Class MainClass     Public Shared Sub Main()         Dim document As XPathDocument = New XPathDocument("books.xml")         Dim navigator As XPathNavigator = document.CreateNavigator()                  Dim node As XPathNavigator = navigator.SelectSingleNode("//title")         Console.WriteLine(node.InnerXml)     End Sub End Class