xml spy
Previous  Top  Next
Evaluate XPath

XML Spy includes an XPath Visualizer that allows you to define/check XPath expressions in your XML documents and display the results immediately.

XPath provides a method to find elements, attributes, and other specific items in any type of XML document. The XML Spy XPath Visualizer allows you to enter an XPath into a field and have it evaluated immediately, with the resultant (node set) displayed in a window. Clicking one of these nodes, displays that specific node in the currently active XML Document. The XPath expression is also automatically checked to see if it is valid when you enter it.

The XPath Visualizer is available in the Enhanced Grid and Text view.

Please see the XPath specifications at http://www.w3.org/TR/xpath for more information.

XPath uses in XML Spy
·When creating Identity Constraints  
·Setting breakpoints using the SOAP debugger  
·Checking XSLT code  

To evaluate an XPath expression:

1.Open an XML document in XML Spy (e.g. CompanyLast).  
2.Select the menu option XML | Evaluate XPath or click the Evaluate XPath ic43_xpath icon.  
3.Type an XPath expression in the XPath field (e.g. //First).  

43_xpath1  

The resultant node set, all "First" elements under the Document Root, appears in the node set window.  
4.Click one of the "First" elements in the node set window.  
5.The corresponding element appears in the currently active XML document.  

43_xpath2  

Previous  Top  Next

⌐ 2002 Altova