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 XMLNSC leaving out one level

Post new topic  Reply to topic
 parsing XMLNSC leaving out one level « View previous topic :: View next topic » 
Author Message
francoisvdm
PostPosted: Wed Jul 01, 2009 7:24 am    Post subject: parsing XMLNSC leaving out one level Reply with quote

Partisan

Joined: 09 Aug 2001
Posts: 332

MB 6.1 on XP

I've got XML data coming into MQ Input node (set as blob) and later in the flow I need to parse the data into XMLNSC. I use the following code:
Code:
CREATE LASTCHILD OF OutputRoot DOMAIN 'XMLNSC' PARSE(InputRoot.BLOB.BLOB

                                 ENCODING InputRoot.Properties.Encoding
                                 CCSID InputRoot.Properties.CodedCharSetId
                                 SET 'MyMsgSet');


After parsing the tree looks like:
OutputRoot->XMLNSC->TopLevel->Field1,Field2 etc

I would like it to look like OutputRoot->XMLNSC->Field1,Field2 etc

in other words I want to leave out the top level element.

Is there an easy way to do this either during parsing or after parsing. Note, there is MANY fields under the TopLevel, so I would prefer to keep memory actions down to a minimum...heavily used flow.

Also note, the parse is from a blob.

Thank you...ALL comments welcome...tired on this side trying to change the code.
_________________
If you do not know the answer or you get the urge to answer with "RTFM" or "Search better in this forum", please refrain from doing so, just move on to the next question. Much appreciated.

Francois van der Merwe
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Wed Jul 01, 2009 7:44 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Multiple-rooted documents are not legal XML.
Back to top
View user's profile Send private message
francoisvdm
PostPosted: Wed Jul 01, 2009 8:18 am    Post subject: Reply with quote

Partisan

Joined: 09 Aug 2001
Posts: 332

ok...valid point. When I parse to MRM...then I get error RM Worker not found....but as far as I can see the message set is there...in fact, when I use RCD node it parses ok to MRM. In this parse the "TopLevel" element is not there.
_________________
If you do not know the answer or you get the urge to answer with "RTFM" or "Search better in this forum", please refrain from doing so, just move on to the next question. Much appreciated.

Francois van der Merwe
Back to top
View user's profile Send private message Send e-mail
francoisvdm
PostPosted: Wed Jul 01, 2009 8:46 am    Post subject: Reply with quote

Partisan

Joined: 09 Aug 2001
Posts: 332

Sorry...above msg not valid...late here...did not supply type for MRM parsing
_________________
If you do not know the answer or you get the urge to answer with "RTFM" or "Search better in this forum", please refrain from doing so, just move on to the next question. Much appreciated.

Francois van der Merwe
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Wed Jul 01, 2009 10:17 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

There is a significant difference between MRM-XML and all of the other XML parser. The MRM parser "eats" the root element and subsumes that such that you never use it in MB element paths. All other parsers do not do this, and you must use the Root element name in all of your MB element paths.

Don't use MRM-XML. Don't use XML. Use XMLNSC. And always use the root element name.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Jul 01, 2009 2:09 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Just in case the message gets lost in the noise...everything mqjeff said was 100% correct.
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 XMLNSC leaving out one level
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.