XML Data management in .NET

前端 未结 2 1257
粉色の甜心
粉色の甜心 2021-01-06 23:20

I learning Xml data handling in .NET. I have the following XML format.


    
        book 1
        <         


        
2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-06 23:42

    If the file is reasonable small - i.e. not several MB in size - you should use either XmlDocument (the classic way) or XDocument (the new LINQ classes for XML processing). You will find lots of examples for both.
    The following search results might give a hint as to when you should use which of those classes: http://www.google.com/search?hl=en&q=XmlDocument%20vs.%20XDocument. Personally, I would suggest using XDocument, because its API is easier to use.

提交回复
热议问题