I think the only way you can to this is to wrap it up in a try/catch block and check in the catch area if the error was due to the element not existing.

Spike

Grant Straker wrote:

I need to check if a dynamically assigned XML node exists.

 

Example

 

<cfloop index="i" from="1" to="#numItems#">

                        <cfscript>

            if (isdefined(“objXML.properties.XmlChildren[i].handler”) {

                                    arguments.handler = objXML.properties.XmlChildren[i].handler.xmlText;

            }

                        </cfscript>

</cfloop>

 

The above wont work in an isdefined due to the “I” counter making the variable name invalid.

 

Anybody know  a way around this?

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

-- 
Stephen Milligan
Consultant for hire
http://www.spike.org.uk

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to