tags:

views:

1649

answers:

2

What is the difference between XPath, Xquery and Xpointer? As far as my knowledge, xquery is extended version of Xpath. I have the 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 product is used for which purpose.

+5  A: 

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 sytnax, 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.

Matthew Flaschen
+1  A: 

Well, I think XQuery is something worth to be distinguished. XPath and XPointer are almost the same and are used for XML nodes selection. XQuery on the other hand is quite a big extension of XPath. For example it gives possibility of declaring custom functions. So it's more something like programming language, which works natively with XML. You can check out some samples here: embedding-xquery-in-java

Regards

Rafal Rusin