What can you do with XPath Tester Online?

XPath is a major element in W3C's XSLT standard, it is used to navigate through attributes and elements in an XML document. It can also be used to test document's addressed nodes to determine whether they match a pattern or not.

How do I use the tool?

1. Select the document node


2. Select the 'root' element


3. Select all 'celebrity' elements that are direct children of the 'celebritys' element.


4. Select all 'artist' elements regardless of their positions in the document.


5. Select the 'id' attributes of the 'artist' elements regardless of their positions in the document.


6. Select the textual value of first 'celebrity' element.


7. Select the last 'celebrity' element.


8. Select the first and second 'celebrity' elements using their position.

//celebrity[position() < 3]

9. Select all 'celebrity' elements that have an 'id' attribute.


10. Select the 'celebrity' element with the 'id' attribute value of '3'.


11. Select all 'celebrity' nodes with the 'id' attribute value lower or equal to '3'.


12. Select all the children of the 'singers' node.


13. Select all the elements in the document.


14. Select all the 'celebrity' elements AND the 'artist' elements.


15. Select the name of the first element in the document.


16. Select the numeric value of the 'id' attribute of the first 'celebrity' element.


17. Select the string representation value of the 'id' attribute of the first 'celebrity' element.


18. Select the length of the first 'celebrity' element's textual value.


19. Select the local name of the first 'artist' element, i.e. without the namespace.


20. Select the number of 'artist' elements.


21. Select the sum of the 'id' attributes of the 'artist' elements.

Copyright ©2012~2023 Free Code Format | Think Calculator | BeautifyConverter | GetNewIdentity | AllCallers | World Postal Codes