|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Changing a value in an XML Message |
« View previous topic :: View next topic » |
Author |
Message
|
javaforvivek |
Posted: Wed Apr 07, 2004 4:58 am Post subject: Changing a value in an XML Message |
|
|
 Master
Joined: 14 Jun 2002 Posts: 282 Location: Pune,India
|
Hi,I am using WBIMB5.0:CSD03.
My input message from Application A is like this..
<CurrencyRates>
<FileName>euro.xml</FileName>
<BatchId>10001</BatchId>
<CompanyCode>A5000</Company_Code>
<CurrencyRate>
---
---
</CurrencyRate>
</CurrencyRates>
The CompanyCode mappings between Application A and Application B are maintained in a table. The table Structure is as follows:
CompanyCodeA varchar 50 (Sample Data : A5000)
CompanyCodeB varchar 50 (SampleData : B5000)
I want to replace <CompanyCode>A5000</CompanyCode>
by <CompanyCode>B5000</CompanyCode>
using a compute node + ESQL.
How to do it? _________________ Vivek
------------------------------------------------------
...when you have eliminated the impossible, whatever remains, however improbable, must be the truth. |
|
Back to top |
|
 |
kirani |
Posted: Wed Apr 07, 2004 10:40 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Use SELECT statement to select CompanyCodeB column from your DB table. Your query will be something like this,
Code: |
SET OutputRoot.XML.CurrencyRates.CompanyCode = THE (SELECT ITEM a.CompanyCodeA from Database.YourTableName where a.CompanyCodeB = InputRoot.XML.CurrencyRates.CompanyCode;
|
Refer to ESQL reference manula for further information/examples. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
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
|
|
|
|