Error getting tags :
error 404Error getting tags :
error 404 revXMLChildContents | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Expander triangle

revXMLChildContents(treeID, startNode, tagDelim, nodeDelim, includePathDetails, depth)

Desktop, Web and Server
Platform Support
Mac OS X,Windows,Linux
Returns a list of the tags and text contents of the specified nodes.

revXMLChildContents(2, "/Animal", "/" ,space, false, -1)
put revXMLChildContents(myTree, thisNode, tab, return, true, 3) after it
put revXMLChildContents(tTreeId, "root", tab, return, "full", -1) into tChildPaths

Additional Comments
Expander triangle

Use the revXMLChildContents function to get information about a section of an XML tree.


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 tagDelim is a string that separates each tag name in a child node from the rest.

The nodeDelim is a string that separates each child node from the rest.

The includePathDetails can take the following values:

- "false" : just the name of each node is returned (default)

- "true" : includes which child number each node is in brackets after its name

- "full" : the full path of each node is returned including child numbers in brackets where required

- "relative" : a path relative to startNode is included with child numbers in brackets where required

The depth specifies how many generations of the XML tree to show. If you specify zero, only the startNode is shown; if you specify 1, the startNode and its child nodes are shown, but not their child nodes; and so on. To show all generations, specify -1 as the depth.


The revXMLChildContents function returns a string.


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

The revXMLChildContents function returns the text content of a node. This is defined as the first piece of text not contained within a child node. For example:

<root><child>Text<subchild>Child Text</subchild>Text 2</child></root>

In the preceeding XML document, revXMLChildContents will return the string "Text" when called with "root" as the startNode and 1 as the depth.

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