I apologize if this was asked before. (I’m just learning this.)
Say, I have the following XML:
<Row>
<c0>1</c0>
<c1>31b64f1cb075</c1>
<c2>Developer</c2>
<c3/>
<c4/>
<c5/>
<c6/>
<c7/>
<c8>USA</c8>
<c9>http://www.microsoft.com</c9>
<c10>sales@microsoft.com</c10>
<c11/>
<c12/>
<c13/>
<c14>-2147483648</c14>
<c15>2012-03-08T09:55:42-08:00</c15>
<c16>00000000-0000-0000-0000-000000000000</c16>
<c17>587312C</c17>
</Row>
Say, I get to the “row” element by using:
//xmlReader is of type XmlReader
xmlReader.ReadToFollowing("Row");
But how do I collect all “c*” child elements not knowing their names and how many of them are there?
You can also use an XmlDocument to load your xml and simply loop through the childnodes like this
You can read more about it here http://msdn.microsoft.com/en-us/library/system.xml.xmlnode.childnodes.aspx
Hope it helps!