XML Manipulation-3.826.1615
XML Manipulation | |
|---|---|
Author Jerry Chae
Primary Features The XML Manipulation plugin edits XML files. It includes six useful operations that are set, get, delete, length, appendnext, and appendchild
About XML and Xpath XML is a format to organize text information with certain rules and used frequently as configuration files as the format is very helpful for both machines and humans to READ. To read a specific data in XML document, Xpath is the widely used approach. With the XML Manipulation plugin, it deploys lxml format the here is the link to a thorough explanation as to the Xpath.
https://lxml.de/xpathxslt.html#xpath
|
Input (Requirements)
Operation
Get retrieves data
Set writes/modifies data
Delete deletes data
Length obtain # of elements
Appendnext appends data at the same level
Appendchild appends data to a level below
Input XML file file must have extension .xml
Input Xpath statement see above link for more explanations
Input (Advanced)
Output xml file-path must specify output file path for delete, set, and append menus
String for Value used to specify value for set and append menus
Strip Blanks removes white spaces before and after the returned value (get)
Output
Return Value
String for the get and length operations
Output file path for set, delete, and append operations
Return Code
0 for successful execution
1 for invalid xml input file
2 for invalid Xpath statement
99 for everything else
Parameter Setting Examples
Below examples are using this sample .xml file
1) Get value with Absolute Xpath
2) Get value with Relative Xpath
3) Get attribute with Relative Xpath
4) Length operation
5) Delete value operation
6) Delete attribute operation
7) Set value operation – modification of existing value
8) Set attribute – modifying existing attribute
9) Set attribute – adding non-existing attribute
10) Append_next operation
11) Append_child operation
Return Code
Code | Meaning |
|---|---|
0 | Execution successful |
1 | Parameter error (invalid XML file) |
2 | Reference error (invalid XPath) |
99 | Other errors |