Given this XML in a file...

<?xml version="1.0" encoding="utf-8"?>
<string>
   <deliveryMethod type="fax" />
</string>

And this CF code in a cfm file...

<cffile action="READ" file=#ExpandPath("./test.xml")# variable="rawXML">
<cfscript>
myXMLDoc = XMLParse(rawXML);

if (isXMLElem("myXMLDoc.string.deliveryMethod"))
   WriteOutput("element found");
else
   WriteOutput("element was not found");
</cfscript>

Why does isXMLElem() never come back as true? I've tried every permutation
that I can think of as the parameter for that function -- with slashes
instead of periods, with and without quote marks, etc.

Could someone please tell me how this function is supposed to work? Thanks!

jay

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Reply via email to