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.
xmlChildPos(elem, childname, n)
→ returns numeric
The second item element is the third child of list, because a note element comes before it.
doc = xmlParse( "<list><item>A</item><note>X</note><item>B</item></list>" );
writeOutput( xmlChildPos( doc.list, "item", 2 ) );
Expected Result: 3
Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.