What is the difference between XPath
, XQuery
and XPointer
? As far as I know, XQuery
is an extended version of XPath
. I have some basic knowledge of XPath
. Is there any feature available in XPath
which is not in XQuery
? Yesterday, I heard a new word, XPointer
. I am confused. Which language is used for which purpose?
XPath is a xml path language that is used to select nodes from an xml document using queries. XQuery is used to extract and manipulate data from either xml documents or relational databases and ms office documents that support an xml data source.
XQuery is an active programming language which is used to interact with XML data groups. XPath is an XML method language which is applied for node selection in XML dataset using queries.
XPointer, which is based on the XML Path Language (XPath), supports addressing into the internal structures of XML documents.
XQuery is XPath compliant. It uses XPath expressions to restrict the search results on XML collections. For more details on how to use XPath, see our XPath Tutorial.
Wikipedia is a good place to start for questions like this. Generally, XPath is a language used to succinctly pinpoint exact XML nodes in a DOM. XQuery is a superset of XPath that also provides FLWOR syntax, which is SQL-like. Finally, XPointer includes XPath, but also provides a simpler position-based addressing scheme.
Of course, you can always read the W3C specs for full details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With