<doc>
  <legacy_id>2209</legacy_id>
  <name>revXMLChildContents</name>
  <type>function</type>
  <syntax>
    <example>revXMLChildContents(<i>treeID</i>, <i>startNode</i>, <i>tagDelim</i>, <i>nodeDelim, includePathDetails</i>, <i>depth</i>)</example>
  </syntax>
  <library>XML library</library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Text and Data Processing</category>
    <category>Standalone Applications</category>
  </classification>
  <references>
    <command tag="revXMLAppend">revXMLAppend Command</command>
    <function tag="revXMLNumberOfChildren">revXMLNumberOfChildren Function</function>
    <function tag="revXMLAttributes">revXMLAttributes Function</function>
  </references>
  <history>
    <introduced version="2.0">Added.</introduced>
    <changed version="2.9"></changed>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
    <ios/>
    <android/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
    <mobile/>
  </classes>
  <security>
    <disk access="???"/>
  </security>
  <summary><glossary tag="return">Returns</glossary> a list of the <glossary tag="tag">tags</glossary> and text contents of the specified <property tag="nodes">nodes</property>.</summary>
  <examples>
    <example>revXMLChildContents(2, "/Animal", "/" ,space, false, -1)</example>
    <example>put revXMLChildContents(myTree, thisNode, tab, return, true, 3) after it</example>
    <example>put revXMLChildContents(tTreeId, "root", tab, return, "full", -1) into tChildPaths</example>
  </examples>
  <description>
    <p>Use the <b>revXMLChildContents</b> <control_st tag="function">function</control_st> to get information about a section of an <glossary tag="XML tree">XML tree</glossary>.</p><p/><p><b>Parameters:</b></p><p>The <i>treeID</i> is the number <glossary tag="return">returned</glossary> by the <function tag="revXMLCreateTree">revXMLCreateTree</function> or <function tag="revXMLCreateTreeFromFile">revXMLCreateTreeFromFile</function> <control_st tag="function">function</control_st> when you created the <glossary tag="XML tree">XML tree</glossary>.</p><p/><p>The <i>startNode</i> is the path to the <glossary tag="node">node</glossary> where you want to start.</p><p/><p>The <i>tagDelim</i> is a string that separates each tag name in a child node from the rest.</p><p/><p>The <i>nodeDelim</i> is a string that separates each child node from the rest.</p><p/><p>The <i>includePathDetails</i> can take the following values:</p><p>  - "false" : just the name of each node is returned (default)</p><p>  - "true" : includes which child number each node is in brackets after its name</p><p>  - "full" : the full path of each node is returned including child numbers in brackets where required</p><p>  - "relative" : a path relative to <i>startNode</i> is included with child numbers in brackets where required </p><p/><p>The <i>depth</i> specifies how many generations of the <glossary tag="XML tree">XML tree</glossary> to show. If you specify zero, only the <i>startNode</i> is shown; if you specify 1, the <i>startNode</i> and its <glossary tag="child node">child nodes</glossary> are shown, but not their <glossary tag="child node">child nodes</glossary>; and so on. To show all generations, specify -1 as the <i>depth</i>.</p><p/><p><b>Value:</b></p><p>The <b>revXMLChildContents</b> <control_st tag="function">function</control_st> returns a <keyword tag="string">string</keyword>.</p><p/><p><b>Comments:</b></p><p>If the <b>revXMLChildContents</b> <control_st tag="function">function</control_st> encounters an error, it <glossary tag="return">returns</glossary> an error message starting with "xmlerr".</p><p/><p>The <b>revXMLChildContents</b> 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:</p><p/><p>&lt;root&gt;&lt;child&gt;Text&lt;subchild&gt;Child Text&lt;/subchild&gt;Text 2&lt;/child&gt;&lt;/root&gt;</p><p/><p>In the preceeding XML document, <b>revXMLChildContents</b> will return the string "Text" when called with "root" as the <i>startNode</i> and 1 as the <i>depth</i>.</p><p/><p><img src="202653"/> <b>Important!</b> The <b>revXMLChildContents</b> <control_st tag="function">function</control_st> is part of the <glossary tag="XML library">XML library</glossary>. To ensure that the <control_st tag="function">function</control_st> works in a <glossary tag="standalone application">standalone application</glossary>, you must include this <glossary tag="LiveCode custom library">custom library</glossary> when you create your <glossary tag="standalone application">standalone</glossary>. In the Inclusions section on the General screen of the <glossary tag="Standalone Application Settings">Standalone Application Settings</glossary> window, make sure "XML Library" is selected in the list of script libraries.</p>
  </description>
</doc>