how to add an attribute to an XML element

RisingFlamez

New Member
I am using the DOM parser. I have to parse the following XML:\[code\] <abc> <type action=""> <code>test</code> <value>001</value> </type> <type action=""> <code>test2</code> <value>002</value> </type> </abc>\[/code\]so, depending on the \[code\]value\[/code\] field under the \[code\]type\[/code\] field, I have to fill in the \[code\]action\[/code\] attribute in the \[code\]type\[/code\] field. I am a bit stumped. I am able to get the value of the \[code\]value\[/code\] field, but I don't know how to go back and add the attribute.Any help will be appreciated a lot!!!thanks!
 
Back
Top