I have read a comparison between the two here. This is primarily a question of performance, relating to both memory and speed.
I've got several XML documents that are upwards of 100 - 300 K in size. I've noticed that there is some lag when loading this information into an XDocument
rather than an XmlDocument
object.
- Is there a serious performance difference between these two objects?
- Do they access the content of the XML differently?
- When working with a string of XML, which is preferred, or is there a difference?
The end use of these object is to run queries (XPath
or LINQ, depending) on the object in question.