Parameter |
Comments |
---|---|
Add additional child-element(s) to a selected element for a given xpath. Child elements must be given in a list and each item may be either a string (eg. This parameter requires xpath to be set. |
|
The attribute to select when using parameter value. This is a string, not prepended with |
|
Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly. Choices:
|
|
Search for a given xpath and get content. This parameter requires xpath to be set. Choices:
|
|
Search for a given xpath and provide the count of any matches. This parameter requires xpath to be set. Choices:
|
|
Type of input for add_children and set_children. Choices:
|
|
Add additional child-element(s) after the last selected element for a given xpath. Child elements must be given in a list and each item may be either a string (eg. This parameter requires xpath to be set. Choices:
|
|
Add additional child-element(s) before the first selected element for a given xpath. Child elements must be given in a list and each item may be either a string (eg. This parameter requires xpath to be set. Choices:
|
|
The namespace Needs to be a Default: |
|
Path to the file to operate on. This file must exist ahead of time. This parameter is required, unless xmlstring is given. |
|
Pretty print XML output. Choices:
|
|
Search for a given xpath and print out any matches. This parameter requires xpath to be set. Choices:
|
|
Set the child-element(s) of a selected element for a given xpath. Removes any existing children. Child elements must be specified as in add_children. This parameter requires xpath to be set. |
|
Set or remove an xpath selection (node(s), attribute(s)). Choices:
|
|
Remove CDATA tags surrounding text values. Note that this might break your XML file if text values contain characters that could be interpreted as XML. Choices:
|
|
Perform schema validation of the XML input. This parameter requires xsd_path to be set. Choices:
|
|
Desired state of the selected attribute. Either a string, or to unset a value, the Python Elements default to no value (but present). Attributes default to an empty string. |
|
A string containing XML on which to operate. This parameter is required, unless path is given. |
|
A valid XPath expression describing the item(s) you want to manipulate. Operates on the document root, |
|
Path to the xsd schema file to perform xml validation This file must exist ahead of time. This parameter is required when validate is true. |
Key |
Description |
---|---|
A dictionary with the original xpath, namespaces and state. Returned: success Sample: |
|
The name of the backup file that was created Returned: when backup=true Sample: |
|
The count of xpath matches. Returned: when parameter 'count' is set Sample: |
|
The xpath matches found. Returned: when parameter 'print_match' is set |
|
A message related to the performed action(s). Returned: always |
|
An XML string of the resulting output. Returned: when parameter 'xmlstring' is set |