Sample Code for this Program can be found at the bottom right hand side of this page.
Please visit our Partner....
Enter an XPath Query Expression and click the Test XPath Button. You can use the default document in the XML Document TextBox or replace the default document with one of your own.
Xpath Query Expression:
'XPath Query Expression Tool Sample Code Try XpDoc = New XPathDocument(XmlDocument) XpNav = XpDoc.CreateNavigator XpExp = XpNav.Compile(TextBox1.Text) XpNodeIterate = XpNav.Select(XpExp) If XpNodeIterate.Count = 0 Then lblResults.ForeColor = Yellow lblResults.Text = "No matching nodes were found" Else Do While XpNodeIterate.MoveNext lblResults.Text = lblResults.Text & XpNodeIterate.Current.Value Loop End If Catch XmlException As System.Xml.XmlException lblResults.ForeColor = Red lblResults.Text = "XML Error: " & XmlException.ToString Catch XpException As System.Xml.XPath.XPathException lblResults.ForeColor = Red lblResults.Text = "XPath Error: " & XpException.ToString End Try