Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XPath 2.0 online tester? [closed]

i work with Oxygen XMLTester for xPath selectors, supporting XPath 2.0 specification. So i wonder if there is any online tester working with XPath 2.0 spec.? http://www.xmlme.com/XpathTool.aspx[http://www.xmlme.com/XpathTool.aspx][2] http://www.xpathtester.com/test[http://www.xpathtester.com/test][3]

Those above-mentioned testers failed to take the following XPAth (2.0 rather succeded):/list/sum(item/prices/price[@currency='USD']) with XML:

<list>
   <item new='true'>
     <title lang="en">Pop-Music DVD</title>
     <author >K. A. Bred</author>
     <year>2012</year>
     <prices>
       <price currency="USD">29.99</price>
       <price currency="EUR">23.2</price>
     </prices>
   </item>
   <item new='false'>
    <title>Gone with the wind</title>
    <author>M. Mitchell</author>
    <year>1936</year>
    <prices>
      <price currency="USD">19.05</price>
      <price currency="EUR">15</price>
    </prices>
  </item>
</list>
like image 390
Igor Savinkin Avatar asked Jul 09 '12 08:07

Igor Savinkin


People also ask

Does browser engine support XPath 2.0 functions like ends with?

Selenium use browser's XPath engine by default. Most browsers support XPath 1.0 only, and ends-with is only available in XPath 2.0.

What is XPath tester?

Allows you to test your XPath expressions/queries against an XML file. This tool runs better than other existing XPath online tools as it supports most of the XPath functions (string(), number(), name(), string-length() etc.) and does not limit you to working against nodes.


2 Answers

Since this bubbled up again:

I also made a XPath 2.0 online tester here.

Not so colorful or descriptive, but IMHO easier to use for small queries.

like image 140
BeniBela Avatar answered Sep 20 '22 05:09

BeniBela


There's now an online XPath 2.0 tester/analyser at:

http://www.qutoric.com/xslt/analyser/xpathtool.html

This actually runs using the Saxon-CE XSLT 2.0 processor under the covers (the app was written in XSLT 2.0). Screenshot showing your expression evaluated:

enter image description here

like image 30
pgfearo Avatar answered Sep 18 '22 05:09

pgfearo