Hi everyone,

I have found interesting error with XMLSearch(). I am doing a web
service with FedEX and have saved the returned xml values. The
returned XML file can be found at 
http://www.technicalsynergy.com/XMLSample/fedExSample.xml.

In order duplicate the problem, read the XML file into memory
variables and dump it. For the case of this explanation, I'm going to
use returnXML. There is a section in the XML file called BarCodes.
Under BarCodes is two sections (BinaryBarCodes & StringBarCodes - in
this order). Each of these sections has a TYPE & VALUE element.

Here is the problem, when retrieving the StringBarCodes->TYPE,
XMLSearch returns the value for BinaryBarCodes->Type instead.

The Values in the XML for each section are as follows:

BinaryBarCodes:
   Type = COMMON_2D
   VALUE = Wyk+HjAxHTAyMzMwNjcdODQwH (base 64 encoded)

StringBarCodes:
   Type = ASTRA
   VALUE = 33306775520000047948041567382018


Code to reproduce the problem:

<cfset step1 = XMLSearch(returnXML, "//*[local-
name()='StringBarCodes']").get(0)>
<cfset step2 = XMLSearch(step1, "//*[local-
name()='Type']").get(0).XmlText>

The above code should return ASTRA but returns COMMON_2D instead. This
is the problem. When you dump the value of STEP1, you will that it
pulled the right area of the XML file.

I hope that explains the problem. Again, you can retrieve the XML
returned code from my web site listed above.

Thanks,
-Drew

-- 
Open BlueDragon Public Mailing List
 http://www.openbluedragon.org/   http://twitter.com/OpenBlueDragon
 official manual: http://www.openbluedragon.org/manual/
 Ready2Run CFML http://www.openbluedragon.org/openbdjam/

 mailing list - http://groups.google.com/group/openbd?hl=en

Reply via email to