this is a stripped down version of my XML file: simple.xml
<project>
<scenes>
<scene>
<rootgroup>
<nodelist>
<module type="WRITE" name="Write_1080P">
<option>
<disabled val="true"/>
</option>
</module>
</nodelist>
</rootgroup>
</scene>
</scenes>
</project>
I need a vbscript find the correct "module" node by it's attribute name="Write_1080p" and then change the attribute "val" of his child node "disabled".
Should be quite simple, but I'm new to scripting in VB and am about to have a seizure.
This script:
output:
shows how to use
.setProperty "SelectionLanguage", "XPath"
to make sure that XPath queries are processed, how to query for an attribute value (..t/module[@name=""Write_1080P""]/opt..
), and how to read (.getAttribute("val")
) and write (.setAttribute "val", "disabled"
) an attribute.P.S. Look here to see how you can look for/change text (with essentially the same code).