I've seen similar when working with content retrieved from URLs. What I
found was the problem wasn't in the content of the xml, but in some
additional data that was passed along prior to the xml payload I wanted. My
workaround to this was to use some IO Stream APIs to read the content into a
string and then parse the data.

Out of curiousity, if you save the payload to a file, can you read it with
XMLBeans (ie, XMLObject.parse(...))?

HTH,
-jacobd

On Fri, Aug 21, 2009 at 10:03 AM, Bartolomeo Nicolotti <bnicolo...@siapcn.it
> wrote:

> Hi,
>
> we're receiving xml from a supplier encoded in ISO-8859-1, but some tags
> body are encoded with UTF-8, but they are surrounded with CDATA, so that
> strange encodings, like 0x1c character shouldn't be a problem to the
> parser, as said here:
>
> http://www.w3schools.com/xmL/xml_cdata.asp
>
> We've built a parser with xmlbean last stable version, but the parser
> complain about this 0x1c character, see attachment near:
>
> ...
> "denominaciones de origen espa"
> ...
>
> Fri Aug 21 16:14:39 CEST 2009:class
> com.siap.DPKWebServices.Util.OTA_literal_HttpPost.queryHttp caught an
> exception: 29047814 org.apache.xmlbeans.XmlException
>  e.toString():org.apache.xmlbeans.XmlException: error: Illegal XML
> character: 0x1c
> org.apache.xmlbeans.impl.piccolo.io.IllegalCharException: Illegal XML
> character: 0x1c
>        at
>
> org.apache.xmlbeans.impl.piccolo.xml.XMLReaderReader.read(XMLReaderReader.java:169)
>        at
>
> org.apache.xmlbeans.impl.piccolo.xml.PiccoloLexer.yy_refill(PiccoloLexer.java:3474)
>        at
>
> org.apache.xmlbeans.impl.piccolo.xml.PiccoloLexer.yynextChar(PiccoloLexer.java:3721)
>        at
>
> org.apache.xmlbeans.impl.piccolo.xml.PiccoloLexer.parseCdataSection(PiccoloLexer.java:2671)
>        at
>
> org.apache.xmlbeans.impl.piccolo.xml.PiccoloLexer.yylex(PiccoloLexer.java:4850)
>        at
> org.apache.xmlbeans.impl.piccolo.xml.Piccolo.yylex(Piccolo.java:1290)
>        at
> org.apache.xmlbeans.impl.piccolo.xml.Piccolo.yyparse(Piccolo.java:1400)
>        at
> org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:714)
>        at org.apache.xmlbeans.impl.store.Locale
> $SaxLoader.load(Locale.java:3439)
>        at org.apache.xmlbeans.impl.store.Locale.parse(Locale.java:706)
>        at
> org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:690)
>        at
> org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:677)
>        at
>
> org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:208)
>        at com.siap.TransHotel.GetAvailAccomDocument
> $Factory.parse(Unknown Source)
>        at
> com.siap.DPKWebServices.Util.TransHotelUtil.validateRS(TransHotelUti
>
> Is there a way to work-around this prolem?
>
> Many thanks
>
> Best regards
>
> Bartolomeo
>
> --
> Bartolomeo Nicolotti
> SIAP s.r.l.
> www.siapcn.it
> v.S.Albano 13 12049
> Trinità(CN) Italy
> ph:+39 0172 652553
> centralino: +39 0172 652511
> fax: +39 0172 652519
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
>

Reply via email to