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

Re: Not well-formed data in XML



Hello Wilbert,

> We have regularly problems processing XML data from a large transport
> company, because of invalid characters in the data. Things like ü and
> so forth. Is there a way to process the received data first to get the
> garbage out and then pass it the parser?

Sure.  Instead of calling http_url_post_xml(), call http_url_post(). 
This'll save the data to a file in the IFS.  You can do whatever you 
like with that file.  Then call http_parse_xml_stmf() to parse the XML 
from the IFS file -- or parse it yourself using another method, if you 
prefer!

This is demonstrated in EXAMPLE15.   Check HTTPAPI_H for details about 
the parameters for each API.


> Or is there a way that the parser doesn't fall over when processing
> those characters?

I don't understand why these characters are causing Expat to 
"fall-over"?  It doesn't seem like they should matter, they're just 
character data, right?  Can you send me a sample XML document that 
causes this error?
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------