Author |
Message
|
madrox |
Posted: Mon May 11, 2015 4:03 am Post subject: Invalid XML character (Unicode: 0x1a) was found in the CDATA |
|
|
 Acolyte
Joined: 11 Mar 2015 Posts: 71
|
Hello All,
I am getting a
An invalid XML character (Unicode: 0x1a) was found in the CDATA section
every once in a while when i am inserting the bitstream data from the event monitoring into a DB. My code is:
Code: |
SET RequestasCHAR = CAST(InputRoot.XMLNSC.wmb:event.wmb:bitstreamData.wmb:bitstream AS CHARACTER CCSID 1208); |
And i get the following error
Quote: |
ErrorText: XML Parsing Errors have occurred, ErrorCode: 5004, ErrorText: An XML parsing error has occurred while parsing the XML document, 1501, 2, 1, 4244, An invalid XML character (Unicode: 0x1a) was found in the CDATA section., /Root/XMLNSC/http://www.ibm.com/xmlns/prod/websphere/messagebroker/6.1.0/monitoring/event:event/http://www.ibm.com/xmlns/prod/websphere/messagebroker/6.1.0/monitoring/event:bitstreamData/http://www.ibm.com/xmlns/prod/websphere/messagebroker/6.1.0/monitoring/event:bitstream, ErrorText: /Root/XMLNSC/http://www.ibm.com/xmlns/prod/websphere/messagebroker/6.1.0/monitoring/event:event/http://www.ibm.com/xmlns/prod/websphere/messagebroker/6.1.0/monitoring/event:bitstreamData/http://www.ibm.com/xmlns/prod/websphere/messagebroker/6.1.0/monitoring/event:bitstream |
Any help would be appreciated. |
|
Back to top |
|
 |
Vitor |
Posted: Mon May 11, 2015 4:38 am Post subject: Re: Invalid XML character (Unicode: 0x1a) was found in the C |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
madrox wrote: |
Any help would be appreciated. |
With what? The character 0x1A isn't valid in an XML document, even in a CDATA section. I'm with the parser on this one.... _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
smdavies99 |
Posted: Mon May 11, 2015 4:43 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
searching for '0x1a' will bring up a lot os posts. It mght be worth perusing them.
Are you sure that the CCSID of the message is 1208? could the data have been sent wrongly?
does the message that generated the problem get parsed correctly by the flow? _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon May 11, 2015 4:44 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Not sure it's the parser... I suspect a CCSID issue.
What CCSID is the data on the DB stored in/with ?
IIRC 1A is a replacement char for a not found in the corresponding CCSID conversion table...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
madrox |
Posted: Tue May 12, 2015 6:35 am Post subject: |
|
|
 Acolyte
Joined: 11 Mar 2015 Posts: 71
|
The data is being pulled from a row on a sql server DB which is set to varchar(max). |
|
Back to top |
|
 |
mqjeff |
Posted: Tue May 12, 2015 6:54 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
madrox wrote: |
The data is being pulled from a row on a sql server DB which is set to varchar(max). |
And if you use any other XML parser to verify the data, does it work? |
|
Back to top |
|
 |
madrox |
Posted: Tue May 12, 2015 7:33 am Post subject: |
|
|
 Acolyte
Joined: 11 Mar 2015 Posts: 71
|
The parser is working fine for all my other flows. But this one flow which reads this column(which has user input data some time from ms word)gives me this issue every now and then.
What parser do you suggest i use? |
|
Back to top |
|
 |
Vitor |
Posted: Tue May 12, 2015 7:37 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
madrox wrote: |
What parser do you suggest i use? |
How about the one built into XMLSpy or some other tooling?
I believe my most worthy associate is enquiring if you've checked the data independantly of the IBM product to see if it really does have an invalid XML character in it. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|