XMLChildPos
Gets the position of a child element within an XML document object.
The position, in an XmlChildren array, of the Nth child that has the specified name.
Method Signature
XMLChildPos(elem=[XML], childname=[string], n=[integer])Arguments
Argument
Type
Required
Description
Default
elem
XML
true
The XML DOM object.
childname
string
true
The name of the child element.
n
integer
true
The position of the child element. 1-based.
Examples
Get the position of an XML child element
xml = xmlParse( "<root><a/><b/><c/></root>" );
result = xmlChildPos( xml.xmlRoot, "b" );
writeOutput( result );
Result: 2
Related
Last updated
Was this helpful?
