Whatever message this page gives is out now! Go check it out!
file="C:\inetpub\wwwroot\examples\employeesimple.xml"
variable="myxml">
<cfscript>
myxmldoc = XmlParse(myxml);
selectedElements = XmlSearch(myxmldoc, "/employee/name/last");
for (i = 1; i LTE ArrayLen(selectedElements); i = i + 1)
writeoutput(selectedElements[i].XmlText & "<br>");
</cfscript>
XmlSearch() with an XML string instead of an XML document object, ColdFusion parses the string before evaluating the XPath expression. Starting in this release, XML containing a <!DOCTYPE ...> declaration is rejected unless you pass ALLOWDOCTYPEDECLARATION=true in the params struct.<cfset params = {
ALLOWDOCTYPEDECLARATION = true,
ALLOWEXTERNALENTITIES = false,
ENTITYEXPANSIONLIMIT = 1000
}>
<cfset selectedElements = XmlSearch(myXmlString, "/employee/name/last", params)>