logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

read-xml - (XML-parsing)

Description

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": menu/popup/menuitem/onclick or if "onclick" is an attribute of "menuitem": menu/popup/menuitem/onclick/@

Examples

See xml-doc.

Name

read-xml - (XML-parsing)

Purpose

Read data elements from XML document.

See Also

XML parsing read-xmlxml-doc See all documentation $DATE $VERSION GOLF(2gg)

Syntax

read-xml <xml> \ [ key <key> ] \ [ value <value> ] \ [ status <status> ] \ [ next ]

See Also