I can't figure it out.
I try to modify an XML, but I get lost when finding the issue why it's not working.
I have a file "foo.xml"
And I try to achieve this:
Let's assume I am not sure if the attributes sky and earth exist in the file, before editing.
This is how my NSIS code looks like:
I try to modify an XML, but I get lost when finding the issue why it's not working.
I have a file "foo.xml"
HTML Code:
<global> <colors lava="orange" sky="blue" > </colors> </global>
HTML Code:
<global> <colors lava="orange" sky="cyan" earth="brown" > </colors> </global>
This is how my NSIS code looks like:
I haven't found any information in the documentation how to overwrite, add, or remove attributes with their values. Do I have to remove entire nodes, and append them again in the end?code:
nsisXML::create
nsisXML::load "foo.xml"
nsisXML::select "/global/colors"
nsisXML::setAttribute "sky" "cyan"
nsisXML::setAttribute "earth" "brown"
nsisXML::save
Comment