Simple XML
<employee>
<name EmpType="Regular">
<first>Almanzo</first>
<last>Wilder</last>
</name>
</employee>
I’m trying to use CFSCRIPT to test for the existence of the attribute “EmpType”
Tried using isDefined(‘_XMLDoc.employee.name[1].xmlAttributes.EmpType’);
to no avail
Tried using structkeyexists(_XMLDoc,’employee.name[1].xmlAttributes.EmpType’);
to no avail
Any other thoughts?
I agree StructKeyExists is what you want change this:
To this:
You want all but the last item you’re checking for as the first argument.