revXMLAttributes

Typefunction
DictionaryLCS
LibraryLiveCode Script
Syntax
revXMLAttributes(<treeID>, <node>, <valueDelim>, <attributeDelim>)
Associationsxml library
Summary

Returns a list of all attributes and their values for the specified node.

Introduced2.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Parameters
NameTypeDescription
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

A string that separates an attribute's value from its name.

attributeDelim

A string that separates attribute name/value pairs from each other.

Example
revXMLAttributes(3,"/Continents",": ",return)
put revXMLAttributes(myTree,thisNode," - ",";") into field "Attr"
repeat for each line thisLine in revXMLAttributes(1,"/",tab,return)
Values
NameTypeDescription
return

The revXMLAttributes function returns a string.

RelatedKeyword: string
Glossary: node, Standalone Application Settings, loop, attribute, return, standalone application, LiveCode custom library
Command: revXMLSetAttribute
Function: revXMLAttributeValues, revXMLText, revXMLAttribute, revXMLMatchingNode, revXMLChildContents
Library: XML library
Control Structure: function, repeat
Securitydisk
Description

Use the revXMLAttributes function to display a node's attributes or to scan each attribute in a repeat loop.

If the revXMLAttributes function encounters an error, it 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 custom library when you create your standalone. In the Inclusions pane of the Standalone Application Settings window, make sure the "XML" checkbox is checked.

Tagstext processing