• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

XML Parse / Loop problems

Explorer ,
Dec 06, 2006 Dec 06, 2006

Copy link to clipboard

Copied

I'm retrieving results from a webservice for products, my daily routine has hiccuped on products beginning with 'N'

CFHTTP was pulling 1000 records at a time, using xmlparse(cfhttp.filecontent) and then I wrote the results to the database.

The error I've encountered is

An error occured while Parsing an XML document.
An invalid XML character (Unicode: 0x8) was found in the CDATA section.


I've stripped all the write to database code and can confirm the XMLParse function is producing this error. I've tried a few different charsets "iso-8859-1" and "utf-8" I also have <cfhttpparam type="header" name="Accept-Encoding" value="*"/> within the CFHTTP get.

If I try and get fewer records, but loop multiple times I get a mixture of unusual results.

Loop 1 - 10 with 50 results
I get the same error message on the 7th loop, suggesting a problem with a record between 350 and 400.

Loop 1 - 25 with 20 results
I get the same error message on the 13th loop, suggesting a problem with a record between 260 and 280.

Loop 1 - 100 with 10 results
It loops 1 - 31 refreshes the page and does 1-31 again... forever.. no errors messages.

The only code on the page is (overly simplified)

<cfsetting requesttimeout="99999">
<cfloop>
<cfhttp>
<cfdump var="#page#">
xmlparse(cfhttp.filecontent)
</cfloop>

Thanks
TOPICS
Advanced techniques

Views

566

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Dec 06, 2006 Dec 06, 2006

Copy link to clipboard

Copied

Any euro signs in the data?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 07, 2006 Dec 07, 2006

Copy link to clipboard

Copied

LATEST
I had posted this in another forum, as I was urgent for a resolution

http://www.experts-exchange.com/Web/WebDevSoftware/ColdFusion/Q_22084205.html

the answer was

can tell you the error is with product #B00009QI5I

in the description of the game, there's a piece of the description..."uy it if u like hockey" which is throwing the whole xml document off, without that piece, everything works...

has a code of &#x8;

the best thing I can recommend is making the provider aware of this mistake in their product description, if they are providing this webservice to others, I'm willing to bet they're making people un-happy.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation