Error getting tags :
error 404Error getting tags :
error 404 revPutIntoXMLNode | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
revPutIntoXMLNode
Basics
Expander triangle
Type
Command
Syntax

revPutIntoXMLNode treeID,node,newContents [, replaceTextOnly ]

Introduced
2.0
Changed
2.9
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
Disk
Summary
Sets the contents of a node in an XML tree.
Examples

revPutIntoXMLNode 12,"/Article/Author","Jane Li"
revPutIntoXMLNode myCurrentNode,dataPaths["current"],field "Data", true

Additional Comments
Expander triangle

Use the revPutIntoXMLNode command to put data into a node, between the node's start and end tags.

Parameters:

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

The nodePath is the path to the node whose contents you want to set.

The newContents is the text that the node will contain.

The replaceTextOnly specifies whether to keep child nodes or not. If replaceTextOnly is true then all text in the specified node is replaced with newContents, but all child nodes are preserved. Otherwise all child nodes are removed. The replaceTextOnly parameter is optional, and if not given, defaults to false.

Comments:

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

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

revPutIntoXMLNode the docId of field "xmltree",selectedNode, uniDecode(the unicodeText of field "Contents","UTF8")

Important! The revPutIntoXMLNode command 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 the General screen of the Standalone Application Settings window, make sure "XML Library" is selected in the list of script libraries.

User Comments
Expander triangle