XML file mangler
New in version Neon.
salt.modules.xml.
get_attribute
(file, element)¶Return the attributes of the matched xpath element.
CLI Example:
salt '*' xml.get_attribute /tmp/test.xml ".//element[@id='3']"
salt.modules.xml.
get_value
(file, element)¶Returns the value of the matched xpath element
CLI Example:
salt '*' xml.get_value /tmp/test.xml ".//element"
salt.modules.xml.
set_attribute
(file, element, key, value)¶Set the requested attribute key and value for matched xpath element.
CLI Example:
salt '*' xml.set_attribute /tmp/test.xml ".//element[@id='3']" editedby "gal"
salt.modules.xml.
set_value
(file, element, value)¶Sets the value of the matched xpath element
CLI Example:
salt '*' xml.set_value /tmp/test.xml ".//element" "new value"
Generated on October 28, 2019 at 00:09:45 UTC.
You are viewing docs built from a recent snapshot of the develop branch. Switch to docs for the latest stable release, 2019.2.2.
© 2019 SaltStack. All Rights Reserved, SaltStack Inc. | Privacy Policy