Currently i need to construct and update large xml files. So what is the best C# xml parser to create or update the xml files? I heard about LINQ in c#, can this be used?
+4
A:
The XML capabilities of LINQ to query through and work with large/complex data files is quite good, and better yet, XElement generally tends to be more performant than XmlDocument objects. Working via XElements also simplifies some of the traditional pains and verbose-ness of traditional XML handling, notably namespaces are a lot simpler to deal with.
MSDN reference on Linq to XML: http://msdn.microsoft.com/en-us/library/bb387098.aspx
bakasan
2010-04-12 09:32:03
+6
A:
For really large documents, you may want to use a plain XmlReader
/XmlWriter
pipelined approach, since this avoids loading the whole file into memory, which is the case with both XmlDocument DOM and LINQ-to-SQL.
Lucero
2010-04-12 09:33:38