DOC 2.2.6
XML

Here you can manage XML data file.

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>

Description

    To load a xml string

Parameters

    key:   The key - string - required
    xmlString:   The XML string - string - 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 object saved into the session

admin
xml show
mentdb
[<br> "keyId"<br>]

xml doc <key>

Description

    Return the xml document

Parameters

    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

Parameters

    key:   The key - string - required
admin
xml exist "keyId"
mentdb
1

xml count <key> <xPath>

Description

    To count an object from an xlm document

Parameters

    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 from an xlm document

Parameters

    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 from an xlm document

Parameters

    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 from an xlm document

Parameters

    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 xpath string for a node

Parameters

    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 fields name for a node

Parameters

    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

Parameters

    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 node into a xml document

Parameters

    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 into a xml document

Parameters

    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 insert 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
admin
xml iattribute "keyId" "/data" "id" "987"
mentdb
1

xml dattribute <key> <xPath> <attributeName>

Description

    To delete an attribute to a node

Parameters

    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

Parameters

    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 a xml document

Parameters

    key:   The key - string - required
admin
xml unload "keyId"
mentdb
1

xml unload_all

Description

    To unload all json documents

admin
xml unload_all
mentdb
1

xml escape_10 <data>

Description

    Escape a xml value

Parameters

    data:   The data - string - required
admin
xml escape_10 "..."
mentdb
...

xml escape_11 <data>

Description

    Escape a xml value

Parameters

    data:   The data - string - required
admin
xml escape_11 "..."
mentdb
...


MentDB © 2012 - 2020 - Legal Notice