[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Parsing XML with a value that contains a double quote
hi Kim,
> <PrescriptionLabel>BD INSULIN SYR 0.5 ML
> 30GX1/2"</PrescriptionLabel>
>
> The double quote is messing things up---I get an error:
> XML parse failed at line 2, col 65517: unclosed token
Hmmm... that double quote shouldn't matter!
So, I tried to reproduce your problem... but I could not. It parsed
without any errors or problems for me. Can you please tell me how to
get the same error you're seeing?
I'll give you the code I used (it's compiled against the current beta of
HTTPAPI) Please tell me what I have to change to produce the same error
you're receiving? Here's the code:
H DFTACTGRP(*NO) ACTGRP('KLEMENT') BNDDIR('HTTPAPI')
/copy httpapi_h
D testXml PR
D UserData * value
D depth 10I 0 value
D name 1024A varying const
D path 24576A varying const
D value 65535A varying const
D attrs * dim(32767)
D const options(*varsize)
D KimXml s 100a
D Msg s 52a
/free
KimXml = '<PrescriptionLabel>BD INSULIN SYR 0.5 ML 30GX1/2"'
+ '</PrescriptionLabel>';
if http_parse_xml_string( %addr(KimXml)
: %len(%trimr(KimXml))
: 0
: *null
: %paddr(testXml)
: *null ) < 1;
msg = http_error();
dsply msg;
endif;
*inlr = *on;
/end-free
P testXml B
D testXml PI
D UserData * value
D depth 10I 0 value
D name 1024A varying const
D path 24576A varying const
D value 65535A varying const
D attrs * dim(32767)
D const options(*varsize)
D msg s 52a
/free
msg = value;
dsply msg;
/end-free
P E
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------