Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between XPath, XQuery and XPointer

Tags:

xml

xpath

xquery

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?

like image 372
Shashi Avatar asked May 29 '09 05:05

Shashi


People also ask

What is the difference of XPath and XQuery?

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.

How do you differentiate XQuery vs XPath *\?

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.

What is the relationship of XPointer language and XPath?

XPointer, which is based on the XML Path Language (XPath), supports addressing into the internal structures of XML documents.

Does XQuery use XPath?

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.


1 Answers

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.

like image 177
Matthew Flaschen Avatar answered Sep 30 '22 15:09

Matthew Flaschen