Iterating through all nodes in XML file

后端 未结 5 1995
逝去的感伤
逝去的感伤 2020-11-27 05:16

I want to iterate through all nodes in an XML file and print their names. What is the best way to do this? I am using .NET 2.0.

5条回答
  •  没有蜡笔的小新
    2020-11-27 05:50

    A recursive algorithm that parses through an XmlDocument

    Here is an example - Recursively reading an xml document and using regex to get contents

    Here is another recursive example - http://www.java2s.com/Tutorial/CSharp/0540__XML/LoopThroughXmlDocumentRecursively.html

提交回复
热议问题