[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Parser Problems



Hello Scott,

Thanks for the comments.  The character is actually X'93 but apparently got
translated in the email to X'22.  The web service returns this character
occasionally and it appears to always be the first character of an element.
Is there a good trick to work around it or, maybe as others suggested, try a
different parser?

Regards,
-Tom

-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Friday, October 07, 2011 11:06 AM
To: HTTPAPI and FTPAPI Projects
Subject: Re: Parser Problems

Hi Tom,

The double quote character has a special meaning in an XML document.  It 
should be escaped to " for the parser to work.

Your e-mail says that a "good editor" will show that it's not a double 
quote character.  But, I took a hex dump of your e-mail, and it is 
indeed a double quote character.  It is ASCII x'22', which is indeed the 
double quote character.  (Unless sending it via e-mail is changing 
it.... in which case, please tell me it's original hex value!)


On 10/6/2011 5:52 PM, Tom Thomson wrote:
>
>     I am having trouble with a program that consumes a web service.  The
>     service returns multiples of a parent element each with eleven child
>     elements.  HTTP_parse_xml_string cruises along fine for me most of the
>     time but occasionally errors out and, if I am debugging properly, the
>     error seems to be, "XML_ERROR_INVALID_TOKEN (4)".  I believe it is a
>     data problem.  Here is an example of a child element it chokes on:
>     <ShortDescription>"Children under 16 years stay free when sharing the
>     same cabin/site with paying adults</ShortDescription>.  It's subtle,
>     but the first character of the element is not a double quote as a good
>     editor will show.  Grabbing at straws, I thought changing the CCSID to
>     the parser might help.  I tried both 37 and 1208 but the results were
>     the same.  Any help would be appreciated.
>
>
>     Regards,
>
>     -Tom
>
>
>
>
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------