revXMLAttribute

Typefunction
DictionaryLCS
LibraryLiveCode Script
Syntax
revXMLAttribute(<treeID>, <node>, <attributeName>)
Associationsxml library
Summary

Returns the value of the specified attribute of the specified node of an XML tree.

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 attribute value you want to get.

attributeName

The name of the attribute.

Example
revXMLAttribute(2,"/","Timestamp")
put revXMLAttribute(currTree,currNode,the short name of field x) \
   into field x
Values
NameTypeDescription
return

The revXMLAttribute function returns a string.

RelatedKeyword: string
Control Structure: function
Function: revXMLAttributes, revXMLNodeContents, revXMLCreateTree, revXMLCreateTreeFromFile
Library: XML library
Glossary: LiveCode custom library, node, Standalone Application Settings, standalone application, return, attribute, XML tree
Securitydisk
Description

Use the revXMLAttribute function to get an attribute's value.

If the revXMLAttribute function encounters an error, it returns an error message starting with "xmlerr".

Important: The revXMLAttribute 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