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

revXMLMatchingNode(treeID,startNode,childName,attributeName,attributeValue,depth [, caseSensitive])

Introduced
2.0
Changed
2.9
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
Disk
Summary
Finds the node in an XML tree where the specified attribute of the node has the specified value.
Examples

revXMLMatchingNode(1,revXMLRootNode(1),,"PubYear","2001",-1)
put revXMLMatchingNode(thisTree,it,field "Category",thisAttr,"Yes",4) after tFoundNodePaths

Additional Comments
Expander triangle

Use the revXMLMatchingNode function to search for a node by its attributes.

Parameters:

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

The startNode is the path to the node where you want to start.

The childName is a string specifying which child nodes to scan. If it is empty, all child nodes are scanned. Otherwise, only child nodes whose name matches the childName are scanned.

The attributeName is the name of the attribute you want to examine.

The attributeValue is the value that the attributeName must have to be found.

The depth specifies how many generations to scan. If you specify 1, the parentNode's child nodes are scanned, but not their child nodes. To scan all generations, specify -1 as the depth.

The caseSensitive is true or false and determines whether the attributeValue should be compared in a case-sensitive manner or not. If caseSensitive is not specified, then case is ignored when comparing attribute values (i.e. defaults to false).

Value:

The revXMLMatchingNode function returns a string consisting of the path to the first node containing the specified attribute with the specified value.

Comments:

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

Important! The revXMLMatchingNodefunction 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 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