read-xml <xml> \
[ key <key> ] \
[ value <value> ] \
[ status <status> ] \
[ next ]
Copied!
read-xml reads data elements from <xml> variable, which is created with xml-doc. A data element is a string <key>/<value> pair, where key (in "key" clause) is a normalized key name, which is the current name preceded with the names of all elements leading up to it, separated by a forward slash ("/"). Node that attribute elements end with "@".
The actual <value> is obtained with "value" clause, and the <status> can be obtained with "status" clause. <status> is GG_OKAY if key/value is obtained, and GG_ERR_EXIST if there are no more to get.
Use "next" clause to move to the next sequential key/value pair in the document, from top down as available. Typically, you would get a key first, examine if it's of interest to you, and then obtain value. You can use also use "key", "value" and "next" at the same time if you're going through all elements.
<key> in "key" clause is a normalized name of any given element in XML text. This means every non-leaf element is included, separated by a forward slash ("/"), and arguments end with "@". An example would be, if "onclick" is a element of "menuitem":