LINQ to XML
is Microsoft’s new approach to process XML data using .Net, earlier in the days
of .Net 2.0 we had a number of classes to deal with XMLs like
XMLDocument
XMLReader
XMLTextReader
XMLWriter
XMLTextWriter
XPathNavigator
XmlNodeReader etc ….
XMLReader
XMLTextReader
XMLWriter
XMLTextWriter
XPathNavigator
XmlNodeReader etc ….
Knowing the purpose of each of these classes and using
them at the right time was a tedious process, moreover we had to write many
lines of code to process the XML documents; LINQ to XML comes as a
solution to this problem.
LINQ to XML
provides a set of new classes which can be used to process XML’s more
effectively with limited code.
LINQ to XML loads the XML document into memory from the file system, allows us to modify the xml’s and also allows us to save the updated document back into the file system, the concept is similar to DOM, but it more effective and productive with the new features.
LINQ to XML loads the XML document into memory from the file system, allows us to modify the xml’s and also allows us to save the updated document back into the file system, the concept is similar to DOM, but it more effective and productive with the new features.
Since LINQ to XML supports LINQ queries,
we can parse the XML’s using simple LINQ queries, earlier we had to iterate through
the nodes or use an XPath filter to parse the XML document, now with LINQ
this process has become a lot more easier.
Related Post
No comments:
Post a Comment