XPath

From eedomus - Documentation

Jump to: navigation, search

XPath is a tool to select a single information inside a XML document.

Let us consider the XML document:

 <?xml version="1.0"?>
 <root>
  <article nom="XPath">   
    <authors>
     <author>
      <name>Dupont</name>
     </author>
     <author>
      <name>Dubois</name>
     </author>
    </authors>
   </article>
 </root>


//article select all the elements article of the document, wherever there are /root/article[1] select the first article (after root)


Test your XPath

Your XPath expressions may be check on this test page

Operators

The eedomus XPath supports aso the xPath Operators