Walking an XML tree in C#

后端 未结 4 910
挽巷
挽巷 2021-02-19 22:35

I\'m new to .net and c#, so I want to make sure i\'m using the right tool for the job.

The XML i\'m receiving is a description of a directory tree on another machine, so

4条回答
  •  北恋
    北恋 (楼主)
    2021-02-19 23:00

    XmlReader isn't a particularly friendly API. If you can use .NET 3.5, then loading into LINQ to XML is likely to be your best bet. You could easily use recursion with that.

    Otherwise, XmlDocument would still do the trick... just a bit less pleasantly.

提交回复
热议问题