<doc>
  <legacy_id>2057</legacy_id>
  <name>revXMLAttributeValues</name>
  <type>function</type>
  <syntax>
    <example>revXMLAttributeValues(<i>treeID</i>,<i>startNode</i>,<i>childName</i>,<i>attributeName</i>,<i>delimiter</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>
    <function tag="revXMLMatchingNode">revXMLMatchingNode Function</function>
    <function tag="revXMLAttributes">revXMLAttributes Function</function>
  </references>
  <history>
    <introduced version="2.0">Added.</introduced>
  </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="value">values</glossary> of a specified <glossary tag="attribute">attribute</glossary> for the specified <property tag="nodes">nodes</property> in an <glossary tag="XML tree">XML tree</glossary>.</summary>
  <examples>
    <example>revXMLAttributeValues(2,"/",,"Age",return,-1)</example>
    <example>get revXMLAttributeValues(thisTree,thisNode,field "Type",comma,2)</example>
  </examples>
  <description>
    <p>Use the <b>revXMLAttributeValues</b> <control_st tag="function">function</control_st> to list all the values an <glossary tag="attribute">attribute</glossary> has in an <glossary tag="XML tree">XML tree</glossary> or a section of an <glossary tag="XML tree">XML tree</glossary>, or to get the range of possible values.</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>childName</i> is a <keyword tag="string">string</keyword> specifying which <glossary tag="child node">child nodes</glossary> to scan. If it is empty, all child nodes are scanned. Otherwise, only <glossary tag="child node">child nodes</glossary> whose name matches the <i>childName</i> are scanned.</p><p/><p>The <i>attributeName</i> is the name of the attribute to scan for.</p><p/><p>The <i>delimiter</i> is a string that separates each value from the rest.</p><p/><p>The <i>depth</i> specifies how many generations of the <glossary tag="XML tree">XML tree</glossary> to scan. If you specify zero, only the <i>startNode</i> is scanned; if you specify 1, the <i>startNode</i> and its <glossary tag="child node">child nodes</glossary> are scanned, but not their <glossary tag="child node">child nodes</glossary>; and so on. To scan all generations, specify -1 as the <i>depth</i>.</p><p/><p><b>Value:</b></p><p>The <b>revXMLAttributeValues</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>revXMLAttributeValues</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><img src="202653"/> <b>Important!</b> The <b>revXMLAttributeValues</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>