I have about 15,000 XML in the form of string
. Each of the XML has an average of 1000 nodes.
I do not know the nodes name, and the hierarchical level of the XML. For each XML, I need to parse them into List<string> elements
and List<string> values
.
In a case where parent and child nodes are present, the parent node will be added into the List<string> elements
and a null
or empty string will be added to List<string> values
What are the possible ways of achieving so?
Edited: I supposed I just need to know how to parse one XML, and I can loop the same method for all 15,000 records.
p/s: I thought of using Dictionary
or multi-dimensional List
where I could have something like <key><value>
pair, but it wasn't approved because it will affect other application significantly. So it has to be a List
of Elements and a List
of Values