How to read xml childs from a closed tag parent in c#



I know how to read normal xml files with c# using XmlDocument. But this time the xml file is different, this is the structure:



<year>2010</year>
<value>20000</value>
<exp>k(x + y)/m</exp>
<item>30</item>
<law>Ley 10, art. 40</law>
<law>Ley 10, art. 50</law>
<item>140</item>
<law>Ley 10, art. 40</law>
<year>2011</year>


As you can see, year is the parent node of value, exp and item and item is the parent of law childs. So this is not like the normal


<parent> <child>a</child> </parent>


xml file structure. Can you please give me a hint. Thanks.


No comments:

Post a Comment