I need to add an attribute with a static value to all nodes of a specific type in an existing xml file using xslt. Basically something like this:
<root>
<somenode att1="something" />
<mynode id="1" att1="value1" att2="value2"/>
<mynode id="2" att1="value3" att2="value4"/>
</root>
I need it to be like so:
<root>
<somenode att1="something" />
<mynode id="1" att1="value1" att2="value2" newatt="static string"/>
<mynode id="2" att1="value3" att2="value4" newatt="static string"/>
</root>
I took a look at this answer but I was not able to use it for this case, if it could be used for what I'm trying.
I've never used xslt before, I really need some help.
Thanks.