|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Removing namespace from XML tag |
« View previous topic :: View next topic » |
Author |
Message
|
zico |
Posted: Tue Dec 26, 2006 9:03 am Post subject: Removing namespace from XML tag |
|
|
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 |
|
 |
jefflowrey |
Posted: Tue Dec 26, 2006 9:08 am Post subject: |
|
|
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 |
|
 |
special_agent_Queue |
Posted: Tue Dec 26, 2006 11:24 am Post subject: |
|
|
 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 |
|
 |
zico |
Posted: Tue Jan 02, 2007 12:46 pm Post subject: |
|
|
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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|