How to get and update the value of a attribute from the XML file

Please take a look here, as this example will help you with Getting the value: How to find the value of xml attribute - #2 by Yoichi

These examples will help you with updating it: