Nucleus handler tools › Docs › Context › ChangeXmlAttributeValue

Context.ChangeXmlAttributeValue

Open in the workbench (search, and try it in a handler)

Context.ChangeXmlAttributeValue(
  path: string | number | boolean,
  xpath: string | number | boolean,
  attributeName: string | number | boolean,
  attributeValue: string | number | boolean
): 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.

✎ AI-written, based on Nucleus GenericContext.cs (ChangeXmlAttributeValue). Not from the official docs. Is it wrong? Tell us

✎ Parameters: AI-written from the Nucleus source.

Handler API docs

Is this right? Tell us what's wrong
Stuck, or not sure? Ask other handler authors: Discordr/nucleuscoop