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 » Removing namespace from XML tag

Post new topic  Reply to topic
 Removing namespace from XML tag « View previous topic :: View next topic » 
Author Message
zico
PostPosted: Tue Dec 26, 2006 9:03 am    Post subject: Removing namespace from XML tag Reply with quote

Novice

Joined: 22 Jun 2005
Posts: 21

Hello,

I have the following xml msg coming in :

<LifeInsCust:LifeInsCust xmlns:LifeInsCust="http://www.ibm.com/websphere/crossworlds/2002/BOSchema/LifeInsCust" xmlns:CustInfo="http://www.ibm.com/websphere/crossworlds/2002/BOSchema/CustInfo" locale="en_US" delta="false">
<LifeInsCust:CustInfo>
<CustInfo:CustInfo>
<CustInfo:DivisionID>A001</CustInfo:DivisionID>
<CustInfo:Location>ZPEF</CustInfo:Location>
</CustInfo:CustInfo>
</LifeInsCust:CustInfo>
</LifeInsCust:LifeInsCust>


And required output should look like:
<GenLF>
<DivisionID>A001</DivisionID>
<Location>ZPEF</Location>
</GenLF>

How do i write a common esql statement to identify <CustInfo:CustInfo> tag from the input msg and then get the DivisionID & Location without namespace. Also note <CustInfo:CustInfo> tag can be present any level in the input msg.

Any help would be appreciated.

TIA.

Zico.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Dec 26, 2006 9:08 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

First off, if you're doing Life Insurance, I'd recommend looking at the ACORD messaging standards, rather than re-inventing the wheel.

Secondly, you can use an asterix to represent any namespace, like "*:CustInfo".

Thirdly, you can use an ESQL SELECT to find stuff in a message tree - but that's basic use of the product and OF COURSE you learned that in the training you took.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
special_agent_Queue
PostPosted: Tue Dec 26, 2006 11:24 am    Post subject: Reply with quote

Centurion

Joined: 27 Jul 2006
Posts: 102

And fourth, I bet if you did a search on this forum, you'd find some very helpful posts (and possibly code).

I know from experience.
Back to top
View user's profile Send private message
zico
PostPosted: Tue Jan 02, 2007 12:46 pm    Post subject: Reply with quote

Novice

Joined: 22 Jun 2005
Posts: 21

"*:CustInfo" did not work. Code is below:

To get Division:
InputRoot."XML".(XML.Element)[1]."*:CustInfo".(XML.Element)[1].(XML.Element)[1];

To get Location:
InputRoot."XML".(XML.Element)[1]."*:CustInfo".(XML.Element)[1].(XML.Element)[2];
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 » Removing namespace from XML tag
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.