When you have an XML record with a missing element (not just an empty
element), what's the best way to test for it?

I'm using CFTRY/CFCATCH, and it seems there must be a better way:

<cftry>
   <cfset QuerySetCell(myQuery,'image',
myXMLDoc.data.star[idx].image.XMLText)>
<cfcatch type="Any">
<cfset QuerySetCell(myQuery,'image', '')>
</cfcatch>
</cftry>

I can't control the format of the source.. Just the parsing of whatever
shows up.


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to