What's the difference between XElement.Load and XDocument.Load?

前端 未结 3 1231
终归单人心
终归单人心 2020-12-30 19:37

As stated above, what\'s the difference between XElement.Load and XDocument.Load? They both seemingly load an XML file.

3条回答
  •  醉酒成梦
    2020-12-30 20:03

    There is a difference while loading comments it will not be loaded in case of XElement.Load() While The XDocument.Load() will also get Comment

    Hence while working with Xlinq we should go with XDocument

提交回复
热议问题