Scott - No it's not an invalid char, I've cfdumped the XML.
Dave,
Yeah as weird as it is the T child was not present, it's a PDF too.
I cfdumped the XML and it's just not there. The people who make these files are
notorious for putting next to no effort in to creating files. We found that we
had to do an advertising campaign about 'How to create a document so you can
find it later.'
Anyway, your idea worked perfect, I suspected something along those lines but
thought I'd get some expert thoughts on this... maybe I'd learn something. Well
I did... isDefined doesn't work with arrays.. ;)
Thanks!!
BN
>First, I'm very surprised that you're seeing R elements that don't have a
>child T. Can you confirm that these are actually what you're getting back
>from your GSA or Mini?
>
>Second, you can't test for the existence of array elements with IsDefined.
>But you can store the array element within a variable, then test for the
>existence of members of that variable:
>
><cfloop ...>
> <cfset thisR = XMLContent.GSP.RES.R[idx]>
> <cfif IsDefined("thisR.T")>
></cfloop>
>
>Don't forget, you can also use XPath expressions from within CF. You might
>find that an easy alternative to accessing elements directly, although to be
>honest I haven't tried that myself from within CF while using Google search
>result XML.
>
>Dave Watts, CTO, Fig Leaf Software
>http://www.figleaf.com/
>
>Fig Leaf Training: Adobe/Google/Paperthin Certified Partners
>http://training.figleaf.com/
>
>WebManiacs 2008: the ultimate conference for CF/Flex/AIR developers!
>http://www.webmaniacsconference.com/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304611
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4