I have a xml file that consists of nesting of certain elements except the first one. The xml looks like this :
<ElementA Attribute="value">
<ElementB Attribute="value">
<ElementC Attribute="value"/>
</ElementB>
<ElementB Attribute="value">
<ElementC Attribute="value">
<ElementB Attribute="value">
<ElementC Attribute="value"/>
</ElementB>
</ElementC>
</ElementB>
</ElementA>
So, its like I have ElementA that is used only once. But the pair of ElementB and ElementC can be involved in multiple nesting. The nesting will always be in this order: B-->C-->B-->C....Always this pattern will be followed. C is always going to be the innermost element.Is there any way we could write a loop which will get me to innermost ElementC everytime for the outermost ElementB?
No comments:
Post a Comment