Error getting tags :
error 404Error getting tags :
error 404 revSetXMLAttribute | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
revSetXMLAttribute
Basics
Expander triangle
Type
Command
Syntax
revSetXMLAttribute treeID,node,attributeName,newValue
Introduced
2.0
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
Disk
Summary
Creates an attribute of a node, or sets the value of an existing attribute.
Examples

revSetXMLAttribute 6,"/Vegetable/Tree/Cedar","height","tall"
revSetXMLAttribute thisTree,currNode,myString,field "Data"

Additional Comments
Expander triangle

Use the revSetXMLAttribute command to create and change attributes.

Parameters:

The treeID is the number returned by the revCreateXMLTree or revCreateXMLTreeFromFile function when you created the XML tree.

The node is the path to the node whose attribute will be set.

The attributeName is a string.

The newValue is a string.

Comments:

If the attributeName is not already an attribute of the node, a new attribute with the specified name and value is created.

If the attribute already exists, its value is set to the newValue.

If the revXMLSetAttribute command encounters an error, the result is set to an error message beginning with "xmlerr".

Tip: To put Unicode text into an attribute, first use the uniDecode function to encode the text as UTF-8:

revSetXMLAttribute myTree,the nodeName of me, \

uniDecode(the unicodeText of it,"UTF8")

Important! The revXMLSetAttributecommand is part of the XML library. To ensure that the command works in a standalone application, you must include this custom library when you create your standalone. In the Inclusions section on hte General screen of the Standalone Application Settings window, make sure "XML Library" is selected in the list of script libraries.

User Comments
Expander triangle