xmlSearch always returns an array.  The problem is the code is trying to
convert an array to a simple value and thus the error.

Instead store the result in a variable and access the first element.

Best regards,

Sam

-----------------------------------------------
Blog: http://www.rewindlife.com
Charts: http://www.blinex.com/products/charting
-----------------------------------------------

> -----Original Message-----
> From: Tony Weeg [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 09, 2003 9:20 AM
> To: CF-Talk
> Subject: xmlSearch question
>
> if I know that the xml is valid, why would the xmlSearch()
> bug out telling me this:
>
> coldfusion.runtime.CfJspPage$ComplexObjectException: Complex
> object types cannot be converted to simple values.
>
> <cfoutput>
>
> <cfif len(getData.assetUpdate)>
>
> <cfset tony = xmlParse(getData.AssetUpdate[i])>
>
> <tr>
> <td valign="top" colspan="8" bgcolor="##efefb8">
> #xmlSearch(tony,"/AssetUpdate/Id/IpAddress")#
> </td>
> </tr>
>
> <cfelse>
>
> <tr>
> <td valign="top" colspan="8" bgcolor="##efefb8"> No Data
> Available </td> </tr>
>
> </cfif>
>
> </cfoutput>
>
> ...tony
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to