Hello all! Hopefully there is someone out there who can help me with what I need to achieve.
Goal: Loop through XML file, reading node by node searching for a node with a specific attribute with a specific value, then write to another attribute of said node found.
I feel that isn't as clear as it could be, so hopefully further reading will clarify.
The XML FILE:
<root> <level id="1"> <prop n="LookVertSpeed_Pad" v="120.0"/> <prop n="LookHorzSpeed_Pad" v="260.0"/> <prop n="LookVertAcc_Pad" v="2500.0"/> <prop n="LookHorzAcc_Pad" v="2500.0"/> <prop n="LookVertDec_Pad" v="50000.0"/> <prop n="LookHorzDec_Pad" v="50000.0"/> </level> </root>
Basically I need to load the file that contains a more elaborte yet consistant group of nodes identical to the XML code above and loop through looking for, lets say for example sake, LookVertAcc_Pad in attribute 'n' and update its 'v' attribute to 3000.0. Specifying any <level> node isn't necessary, needed, or warranted. All attributes that I will need to modify will be in this format. I am completely new to reading/writing XML and would highly appreciate any help.