Name: revXMLAttributes

Type: function

Syntax: revXMLAttributes(<treeID>, <node>, <valueDelim>, <attributeDelim>)

Summary:
<return|Returns> a list of all <attribute|attributes> and their values
for the specified <node>.

Associations: xml library

Introduced: 2.0

OS: mac, windows, linux, ios, android

Platforms: desktop, server, mobile

Security: disk

Example:
revXMLAttributes(3,"/Continents",": ",return)

Example:
put revXMLAttributes(myTree,thisNode," - ",";") into field "Attr"

Example:
repeat for each line thisLine in revXMLAttributes(1,"/",tab,return)

Parameters:
treeID:
The number returned by the revXMLCreateTree or revXMLCreateTreeFromFile
function when you created the XML tree.

node:
The path to the node whose attributes you want to list.

valueDelim (string):
A string that separates an attribute's value from its name.

attributeDelim (string):
A string that separates attribute name/value pairs from each other.

Returns:
The <revXMLAttributes> <function> returns a <string>.

Description:
Use the <revXMLAttributes> <function> to display a <node|node's>
<attribute|attributes> or to scan each <attribute> in a <repeat> <loop>.

If the <revXMLAttributes> <function> encounters an error, it
<return|returns> an error message starting with "xmlerr".

>*Important:*  The <revXMLAttributes> <function> is part of the 
> <XML library>. To ensure that the <function> works in a 
> <standalone application>, you must include this 
> <LiveCode custom library|custom library> when you create your 
> <standalone application|standalone>. In the Inclusions pane of the 
> <Standalone Application Settings> window, make sure the "XML" 
> checkbox is checked.

References: revXMLSetAttribute (command), function (control structure),
repeat (control structure), revXMLAttributeValues (function),
revXMLText (function), revXMLAttribute (function),
revXMLMatchingNode (function), revXMLChildContents (function),
node (glossary), Standalone Application Settings (glossary),
loop (glossary), attribute (glossary), return (glossary),
standalone application (glossary), LiveCode custom library (glossary),
string (keyword), XML library (library)

Tags: text processing

