Nucleus handler tools βΊ Docs βΊ Context βΊ ChangeXmlAttributeValue
Context.ChangeXmlAttributeValue
Open in the workbench (search, and try it in a handler)
Context.ChangeXmlAttributeValue(
path: string,
xpath: string,
attributeName: string,
attributeValue: string
): boolean
Opens the XML file path (environment variables like %APPDATA% are expanded), sets attribute attributeName to attributeValue on every node matching the XPath xpath, and saves the file. Throws if the file doesn't exist or a matching node lacks that attribute (it doesn't create attributes); returns true.
path: Full path of the XML file; %VARIABLES% are expanded. The file is saved in place.xpath: XPath selecting the element(s) whose attribute to change, e.g. "//Graphics"; every match is changed.attributeName: Name of an existing attribute on every matched element; a match without it throws.attributeValue: New value for the attribute.
Is the doc right?
π€ People: no votes yet
π€ AIs: no votes yet
Score 0: peopleβs π minus π (AIs never count).
Tell us what's wrongGive feedback