I guess the correct answer depends upon the requirement.
I like this way
<root>
<item key="name">John</item>
<item key="city">London</item>
</root>
So I can use this xpath to get the person's name: //root/item[@key="name"]/text()
Not sure what would be the xpath to get the name if the XML was <root>
<item>
<key>Name</key>
<value>John</value>
</item>
<item>
<key>City</key>
<value>London</value>
</item>
</root>
This is a better example: <employees>
<employee id="1">
<field name="name">John</field>
<field name="city">London</field>
</employee>
<employee id="2">
<field name="name">Jack</field>
<field name="city">Boston</field>
</employee>
<employees>