ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » An XML parsing error has occurred while parsing the XML

Post new topic  Reply to topic
 An XML parsing error has occurred while parsing the XML « View previous topic :: View next topic » 
Author Message
chenna.hari
PostPosted: Thu Aug 19, 2010 9:12 am    Post subject: An XML parsing error has occurred while parsing the XML Reply with quote

Centurion

Joined: 21 Mar 2009
Posts: 103

We have a requirement to transform/validate the xml in message broker 7. but the below error came.

Caught exception and rethrowing. Error detected, rethrowing. XML Parsing Errors have occurred. An XML parsing error has occurred while parsing the XML document.

Cause of Error is Character reference "" is an invalid XML character..


Can any help how resolve this error
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Aug 19, 2010 9:26 am    Post subject: Re: An XML parsing error has occurred while parsing the XML Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

chenna.hari wrote:
Can any help how resolve this error


Tell whoever's sending the message to only send valid XML.

The W3C standard contains rules about what characters can & cannot be in an XML document, and rules for their use.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
chenna.hari
PostPosted: Fri Aug 20, 2010 1:41 am    Post subject: Reply with quote

Centurion

Joined: 21 Mar 2009
Posts: 103

ok.

But is there any way to parse and pass this type of character in messagebroker???
Back to top
View user's profile Send private message
smdavies99
PostPosted: Fri Aug 20, 2010 3:53 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Quote:
But is there any way to parse and pass this type of character in messagebroker???

Yes but it is extremely messy and must be regarded as the last resort.
It involves manipulating an unparsed message (ie the BLOB) but even this may not work.

It is far easier to get the sender to send correct XML.
If they don't know how, then point them at the w3c site. Tell them exactly what is wroing with their message.

They sent it. IT is their responsibility ot make it right. GIGO rules ok!
_________________
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
View user's profile Send private message
Vitor
PostPosted: Fri Aug 20, 2010 4:02 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

chenna.hari wrote:
But is there any way to parse and pass this type of character in messagebroker???


No. If it's not valid XML it won't parse in an XML parser. Try displaying the document in XMLSpy or Internet Explorer and you'll see what I mean.

If you want to "fix" the message you'll need to read it into WMB as a stream of data, then write custom code to try and weed out the invalid characters & rebuild the document as well formed XML. If you achieve this then you might get the document to parse but you'll never know if you've changed the meaning of it.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » An XML parsing error has occurred while parsing the XML
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.