User Guide

922 Chapter 3: ColdFusion Functions
<name EmpType="Contract">
<first>Laura</first>
<last>Ingalls</last>
</name>
</employee>
The CFML file contains the following lines:
<cfscript>
myxmldoc = XmlParse("C:\CFusionMX7\wwwroot\examples\employeesimple.xml");
selectedElements = XmlSearch(myxmldoc, "/employee/name/last");
for (i = 1; i LTE ArrayLen(selectedElements); i = i + 1)
writeoutput(selectedElements[i].XmlText & "<br>");
</cfscript>