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 » Parsing XML Message with mutliple root elements & Decl.

Post new topic  Reply to topic
 Parsing XML Message with mutliple root elements & Decl. « View previous topic :: View next topic » 
Author Message
chanti
PostPosted: Wed Jun 27, 2007 2:29 pm    Post subject: Parsing XML Message with mutliple root elements & Decl. Reply with quote

Novice

Joined: 20 Dec 2005
Posts: 11

Hi,
I am getting a message with multiple xml declarations and multiple root elements on a queue from one of backend systems. I need to parse some elements from that message and build the response for the front end application.

Sample Message I am getting in a queue is:

<?xml version="1.0"?>
<SampleHeader>
<ContentType>XML</ContentType>
<ReplyCompCode>0</ReplyCompCode>
<ReplyReasonCode/>
<ParentDialogRef/>
</SampleHeader>
<?xml version='1.0'?>
<SampleRsp>
<header></header>
<setBanPricePlan> successful invocation </setBanPricePlan>
</SampleRsp>

I need to select one elements from "<SampleHeader>" and one from "<SampleRsp>".

Is there any way to do this type of parsing....?

Thanks
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Jun 27, 2007 2:31 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

That's not a valid XML document.

You won't be able to parse it with an XML parser.

You will have to read it as a BLOB and break it up into separate XML documents...

Well....
Maybe you can do something with MRM and multi-part messages... but not likely.
_________________
I am *not* the model of the modern major general.
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 » Parsing XML Message with mutliple root elements & Decl.
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.