I'd like to change the attribute of certain elements in an xml document. What's the simplest way? (Xquery is the best, or I can handle python somehow)
Change /root/person[1]/@name
to "Jim"
change /root/person[2]/@name
to "John"
Sample.xml
<root>
<person name="brian">
<number>1</number>
<school>Y</school>
<age>18</age>
</person>
<person name="brian">
<number>1</number>
<school>Y</school>
<age>18</age>
</person>
</root>
Sampe_result.xml
<root>
<person name="Jim">
<number>1</number>
<school>Y</school>
<age>18</age>
</person>
<person name="John">
<number>1</number>
<school>Y</school>
<age>18</age>
</person>
</root>