Posted: Tue Mar 08, 2005 4:50 pm Post subject: XML Parsing error
Apprentice
Joined: 03 Jul 2003 Posts: 25 Location: Kolkata
I have an input XML message which parses fine without any error (it opens fine in IE as well as rfhutil). This XML message contains some non-printable characters (like 0x01, etc) in some of its element's value. When I put the message in the input queue of a message flow, it throws the exception 'Invalid character (Unicode: 0x1)'.
Can any one please help me to get rid of this parser error?
Any suggestion is highly appreciated.
Joined: 18 Jul 2002 Posts: 381 Location: Gurgaon, India
One way around this is to read the message as a BLOB and then in a compute node remove these hex characters from the message.
Then you can use the CREATE command with PARSE and DOMAIN options to change the message format to XML. _________________ Shalabh
IBM Cert. WMB V6.0
IBM Cert. MQ V5.3 App. Prog.
IBM Cert. DB2 9 DB Associate
Joined: 17 Jun 2004 Posts: 278 Location: Harrisburg PA
Also note that these characters are according to the W3C XML standard not valid. Just because a display program does or does not display the XML doesn't mean its valid. They mostly just treat it as formated text and make no attempt to parse it as XML. Some of the commerical XML editors have a validator that actually checks form and validates the XML. I get this from the developers all the time here so I have seen it before. If you want to ignore it, the blob hex approach does work, but you are really doing someone elses job. _________________ Patrick Goodhart
MQ Admin/Web Developer/Consultant
WebSphere Application Server Admin
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum