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 » String data to XML format

Post new topic  Reply to topic
 String data to XML format « View previous topic :: View next topic » 
Author Message
nishantmodak
PostPosted: Tue Jun 16, 2009 11:28 am    Post subject: String data to XML format Reply with quote

Novice

Joined: 25 May 2009
Posts: 19

I receive a response message from HTTP Request. THen, SOAP Extract.
The response is of type --

<saveResponse>
<result> [[[this is a string data, which is actually another XML]]]]] </result>
</saveResponse>

Now, this response needs to be understood. and then the [[[.... ]]]] part needs to be converted into an XML and then spitted to a output queue.

Example. The parsed Tree in Debug mode, looks like this.[after soap extract]

XMLNSC
saveResponse
response = " <?xml ...... " (DATA THAT NEEDS TO BE CONVERTED AS XML)
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jun 16, 2009 1:32 pm    Post subject: Re: String data to XML format Reply with quote

Grand High Poobah

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

nishantmodak wrote:
Now, this response needs to be understood. and then the [[[.... ]]]] part needs to be converted into an XML and then spitted to a output queue.


Sounds like you need to PARSE this string.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
nishantmodak
PostPosted: Wed Jun 17, 2009 3:19 am    Post subject: Reply with quote

Novice

Joined: 25 May 2009
Posts: 19

yeah. Parse = true... but, this being a variable length string response....

a bit of a challenge on how to do it, with changing tags.

Any way out of doing this? any smarter ways to do it? using schema's or any built in parsers?
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jun 17, 2009 3:43 am    Post subject: Reply with quote

Grand High Poobah

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

nishantmodak wrote:
yeah. Parse = true... but, this being a variable length string response...


I've never heard of fixed length XML, or XML with a length indicator. I don't see this being variable length as a serious problem.

nishantmodak wrote:
a bit of a challenge on how to do it, with changing tags.


XML is essentially self describing. If you need to validate it against a schema, I'd convert it in one step and validate it in the second. Obviously if it doesn't parse as well formed XML you can trap the error.

nishantmodak wrote:
Any way out of doing this? any smarter ways to do it? using schema's or any built in parsers?


Do what? You're parsing a string into XML. How much smarter do you want? Given your solution currently has one XML doc inside another, which is never especially good, all you're going to do is extract it and parse it.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Jun 17, 2009 4:32 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

nishantmodak wrote:

a bit of a challenge on how to do it, with changing tags.

Any way out of doing this? any smarter ways to do it? using schema's or any built in parsers?


Why ever do you think you need to construct an XML Parser in ESQL?

You can do everything you want with one single ESQL statement. Finding out which statement is *incredibly* easy.
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 » String data to XML format
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.