XML
xml loadxml showxml docxml existxml countxml select nodexml select textxml select attributexml xpathxml fieldsxml itextxml inodexml utextxml iattributexml dattributexml dnodexml unloadxml unload_allxml escape_10xml escape_11
xml load <key> <xmlString> <encoding>
Description
To load an XML string
To load an XML string
Parameters
key: The key - string - required
xmlString: The XML string - string - required
encoding: The encoding - string - not required
key: The key - string - required
xmlString: The XML string - string - required
encoding: The encoding - string - not required
admin
xml load "keyId" "<data id=\"25\"><item>A</item><item>B</item><item>C</item></data>";
mentdb
1
xml show
Description
To show all XML objects saved in the session
To show all XML objects saved in the session
admin
xml show;
mentdb
[<br> "keyId"<br>]
xml doc <key>
Description
Return the XML document
Return the XML document
Parameters
key: The key - string - required
key: The key - string - required
admin
xml doc "keyId";
mentdb
<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?> <data id=\"25\"> <item>A</item> <item>B</item> <item>C</item> </data>
xml exist <key>
Description
To check if a key is loaded
To check if a key is loaded
Parameters
key: The key - string - required
key: The key - string - required
admin
xml exist "keyId"
mentdb
1
xml count <key> <xPath>
Description
To count the objects in an XML document
To count the objects in an XML document
Parameters
key: The key - string - required
xPath: The XPath string - string - required
key: The key - string - required
xPath: The XPath string - string - required
admin
xml count "keyId" "/data"
mentdb
1
xml select node <key> <xPath>
Description
To select a node in an XML document
To select a node in an XML document
Parameters
key: The key - string - required
xPath: The XPath string - string - required
key: The key - string - required
xPath: The XPath string - string - required
admin
xml select node "keyId" "/data";
mentdb
<?xml version="1.0" encoding="UTF-8"?><data id="25"> <item>A</item> <item>B</item> <item>C</item> </data>
xml select text <key> <xPath>
Description
To select a text in an XML document
To select a text in an XML document
Parameters
key: The key - string - required
xPath: The XPath string - string - required
key: The key - string - required
xPath: The XPath string - string - required
admin
xml select text "keyId" "/data/item[1]"
mentdb
A
xml select attribute <key> <xPath>
Description
To select an attribute in an XML document
To select an attribute in an XML document
Parameters
key: The key - string - required
xPath: The XPath string - string - required
key: The key - string - required
xPath: The XPath string - string - required
admin
xml select attribute "keyId" "/data/@id"
mentdb
25
xml xpath <key> <xPath>
Description
To generate all the XPath strings of a node
To generate all the XPath strings of a node
Parameters
key: The key - string - required
xPath: The XPath string - string - required
key: The key - string - required
xPath: The XPath string - string - required
admin
xml xpath "keyId" "/data";
mentdb
[<br> "/data",<br> "/data[@id\u003d\u002725\u0027]",<br> "/data/item",<br> "/data/item[2]",<br> "/data/item[3]"<br>]
xml fields <key> <xPath>
Description
To show all the field names of a node
To show all the field names of a node
Parameters
key: The key - string - required
xPath: The XPath string - string - required
key: The key - string - required
xPath: The XPath string - string - required
admin
xml fields "keyId" "/data"
mentdb
[<br> "item",<br> "item",<br> "item"<br>]
xml itext <key> <xPath> <nodeName> <text>
Description
To insert a new text node
To insert a new text node
Parameters
key: The key - string - required
xPath: The XPath string - string - required
nodeName: The node name - string - required
text: The text - string - required
key: The key - string - required
xPath: The XPath string - string - required
nodeName: The node name - string - required
text: The text - string - required
admin
xml itext "keyId" "/data" "number" "456";
mentdb
1
xml inode <key> <xPath> <node>
Description
To insert a node into an XML document
To insert a node into an XML document
Parameters
key: The key - string - required
xPath: The XPath string - string - required
node: The node - string - required
key: The key - string - required
xPath: The XPath string - string - required
node: The node - string - required
admin
xml inode "keyId" "/data" "<a><a1></a1><a2></a2></a>";
mentdb
1
xml utext <key> <xPath> <text>
Description
To update a text in an XML document
To update a text in an XML document
Parameters
key: The key - string - required
xPath: The XPath string - string - required
text: The text - string - required
key: The key - string - required
xPath: The XPath string - string - required
text: The text - string - required
admin
xml utext "keyId" "/data/item[2]" "Z";
mentdb
1
xml iattribute <key> <xPath> <attributeName> <text>
Description
To add a new attribute to a node
To add a new attribute to a node
Parameters
key: The key - string - required
xPath: The XPath string - string - required
attributeName: The attribute name - string - required
text: The text - string - required
key: The key - string - required
xPath: The XPath string - string - required
attributeName: The attribute name - string - required
text: The text - string - required
admin
xml iattribute "keyId" "/data" "id" "987";
mentdb
1
xml dattribute <key> <xPath> <attributeName>
Description
To delete an attribute from a node
To delete an attribute from a node
Parameters
key: The key - string - required
xPath: The XPath string - string - required
attributeName: The attribute name - string - required
key: The key - string - required
xPath: The XPath string - string - required
attributeName: The attribute name - string - required
admin
xml dattribute "keyId" "/data" "id";
mentdb
1
xml dnode <key> <xPath>
Description
To delete a specific node
To delete a specific node
Parameters
key: The key - string - required
xPath: The XPath string - string - required
key: The key - string - required
xPath: The XPath string - string - required
admin
xml dnode "keyId" "/data/item[2]";
mentdb
1
xml unload <key>
Description
To unload an XML document
To unload an XML document
Parameters
key: The key - string - required
key: The key - string - required
admin
xml unload "keyId";
mentdb
1
xml unload_all
Description
To unload all JSON documents
To unload all JSON documents
admin
xml unload_all;
mentdb
1
xml escape_10 <data>
Description
Escape an XML value
Escape an XML value
Parameters
data: The data - string - required
data: The data - string - required
admin
xml escape_10 "..."
mentdb
...
xml escape_11 <data>
Description
Escape an XML value
Escape an XML value
Parameters
data: The data - string - required
data: The data - string - required
admin
xml escape_11 "..."
mentdb
...
