I'm currently struggeling with reading Sub-Elements from Sub-Elements. What would be the best way to read a XML structured like that:
<network>
<channel type="...">
<sub1.1>...</sub1.1>
<sub1.2>...</sub1.2>
...
</channel>
<channel type="...">
<sub1.1>...</sub1.1>
<sub1.2>...</sub1.2>
...
</channel>
...
<group number="...">
<sub2.1>...</sub2.1>
<sub2.2>...</sub2.2>
...
</group>
...
<group number="...">
<sub2.1>...</sub2.1>
<sub2.2>...</sub2.2>
...
</group>
...
<gateway id="...">
<sub3.1>...</sub3.1>
<sub3.2>...</sub3.2>
<sub3.3>
<sub3.3.1>...</sub3.3.1>
</sub3.3>
<sub3.4>
<sub3.4.1>...</sub3.4.1>
</sub3.4>
...
</gateway>
...
<network>
I would like to read the Attributes like type, number, id... and also all the sub elements and sub-sub elements. I tried it with XMLReader but struggled with getting sub-sub elements etc...
If someone could help me with getting me an approach I would be very thankful.