Using LINQ queries, we can query data from different sources, whether it is relational or XML. LINQ to XML is the XML programming language built on the .NET Language Integrated Query framework. Using LINQ to XML we can create, update, and delete XML elements in the XML tree. It also provides streaming, and the transformation and querying feature, similar to XQuery
and XPath
.
XQuery
is a language which can query structured or semi-structured XML data. XQuery
is based on the XPath
language. It has the ability to iterate, sort, and construct the necessary XML. If the XML document is stored in the SQL server database, which has support for XML, the document can be queried using XQuery
. The result of the XQuery
can be typed or un-typed. The type information of the result is based on the type, which is specified in the XML schema language.
LINQ provides query features to write queries against XML, as we do normally with the relational data model. LINQ provides different query operators...