Ah I should have seen it before, singleSelectNode returns a node object, not a string. Output #address.text# #city.text# and it should work.
http://www.devguru.com/Technologies/xmldom/quickref/node_selectSingleNode.html -- jon mailto:[EMAIL PROTECTED] Thursday, February 20, 2003, 6:23:39 PM, you wrote: A> No. The result is a valid string.. .here is the returning xml string: A> <?xml version="1.0"?> A> <AddressValidateResponse><Address ID="0"><Address2>6406 IVY LN</Address2><City>GREENBELT</City><State>MD</State><Zip5>20770</Zip5><Zip4>1440</Zip4></Address></AddressValidateResponse> A> -----Original Message----- A> From: jon hall [mailto:[EMAIL PROTECTED]] A> Sent: Thursday, February 20, 2003 6:21 PM A> To: CF-Talk A> Subject: Re: XML parsing using CF5 A> When you look at the content of address in the actual xml returned, is A> it null? If so, that is the problem. CF can not handle nulls returned A> from a COM object. SelectSingleNode() returns null if the element is A> blank. Thursday, February 20, 2003, 5:51:06 PM, you wrote: A> Hello All, A> I am trying to implement the USPS API tool on our website. It requires that we parse an XML string that is returned A> back to us via an http get call. A> I think everything is ok up to the point where i have to parse the result. I get the following error: A> ---0---0---0---0---0---0---0---0---0---0---0 A> Error Occurred While Processing Request A> Error Diagnostic Information A> An unexpected system error was detected. (Error code is 1) A> This type of error will most likely occur when the server running ColdFusion is low on memory and/or system resources. A> If you continue to experience this error in a reproducible fashion you should contact Allaire technical support. A> The error occurred while processing an element with a general identifier of (#address#), occupying document position A> (39:13) to (39:21). A> ---0---0---0---0---0---0---0---0---0---0---0 A> I have checked my system (localhost) and am having no performance and/or memory issues. The error goes away as soon A> as i comment out the cfoutput line that tries to display the variable #address#. A> line 39 is where i am trying to cfoutput the address field. This is the line immediately after i am done parsing the A> xml code with the "SelectSingleNode" method. A> The code i'm using is as follows: A> ---0---0---0---0---0---0---0---0---0---0---0 A> <cfset A> xmlbody="API=Verify&XML=<AddressValidateRequest%20USERID='224VITAC8247'%20PASSWORD='359IO45RF129'><Address%20ID='0'><Address1></Address1><Address2>6406%20Ivy%20Lane</Address2><City>Greenbelt</City><State>MD</State><Zip5></Zip5><Zip4></Zip4></Address></AddressValidateRequest>"> A> <cfset server="http://testing.shippingapis.com/ShippingAPITest.dll?"> A> <cfhttp url="#server##xmlbody#" method="GET"></cfhttp> A> <cfoutput> A> #trim(cfhttp.filecontent)# A> </cfoutput> A> <CFOBJECT action="CREATE" type="COM" class="Microsoft.XMLDOM" name="objXML"> A> <cfset objXML.loadXML(cfhttp.filecontent)> A> <CFSET ElementList = objXML.getElementsByTagName("AddressValidateResponse")> A> <cfset counter=0> A> <CFLOOP COLLECTION="#ElementList#" Item="AddressValidateResponse"> A> <cfset counter = counter+1> A> <CFSET address = AddressValidateResponse.SelectSingleNode("Address2")> A> <CFSET city = AddressValidateResponse.SelectSingleNode("City")> A> <CFSET state= AddressValidateResponse.SelectSingleNode("State")> A> <CFSET zip5 = AddressValidateResponse.SelectSingleNode("Zip5")> A> <CFSET zip4 = AddressValidateResponse.SelectSingleNode("Zip4")> A> <cfoutput>#address#</cfoutput> A> <!--- <cfoutput>#counter# - #address# - #city#</cfoutput> ---> A> </CFLOOP> A> <cfoutput> A> counter=#counter# A> </cfoutput> A> ---0---0---0---0---0---0---0---0---0---0---0 A> Any ideas or thoughs on why this may be happening will be greatly appreciated! A> Thanks A> Andres A> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

