Skip to content
Advertisement

Is XPath the same as Linq? [closed]

I studied the concept of XPath and xml but did not understand how they relate to what XPath is designed to do as a query in xml and what XPath for xml is like for sql for a database, what xquery is for query xml data ?

Advertisement

Answer

Differences between XPath and LINQ to XML

XPath doesn’t allow the projection of new types. It can only return collections of nodes from the tree, whereas LINQ to XML can execute a query and project an object graph or an XML tree in a new shape. LINQ to XML queries can do much more than XPath expressions.

For more details, you can read this document from Microsoft

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement