I have an xml file with a structure like this
<display>
<service>
<URL></URL>
<name></name>
<LayerGroups>
<id></id>
<fields>
<field>
<attribute>object</attribute>
<alias>OBJECT</alias>
</field>
<field>
<attribute>name</attribute>
<alias>NAME</alias>
</field>
<fields>
</LayerGroup>
</service>
</display>
I would like to know how I can reference each individual attribute. I imagine it would be something along the lines of _______.display.service.LayerGroups.fields.field.attribute, but there are two "field" and two "attribute". How do I make the distinction?