XDocument or XmlDocument

前端 未结 7 1988
灰色年华
灰色年华 2020-11-22 02:48

I am now learning XmlDocument but I\'ve just ran into XDocument and when I try to search the difference or benefits of them I can\'t find something useful, could you please

7条回答
  •  孤街浪徒
    2020-11-22 03:36

    I believe that XDocument makes a lot more object creation calls. I suspect that for when you're handling a lot of XML documents, XMLDocument will be faster.

    One place this happens is in managing scan data. Many scan tools output their data in XML (for obvious reasons). If you have to process a lot of these scan files, I think you'll have better performance with XMLDocument.

提交回复
热议问题