|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Not able to add new element to output xml message. |
« View previous topic :: View next topic » |
Author |
Message
|
tanishka |
Posted: Tue Jul 27, 2010 10:22 pm Post subject: Not able to add new element to output xml message. |
|
|
Centurion
Joined: 24 Nov 2008 Posts: 144
|
Hi,
I have sample flow which contains MQ input , COMPUTE and output node.
input message is below
<NAME>
<RECORD>value</RECORD>
<RECORD2>value2</RECORD2>
</NAME>
I need to add RECORD1 to output like below
<NAME>
<RECORD>value</RECORD>
<RECORD1>value1</RECORD1>
<RECORD2>value2</RECORD2>
</NAME>
But I am getting output
<NAME>
<RECORD>value</RECORD>
<RECORD2>value2</RECORD2>
</NAME>
<NAME>
<RECORD2/>
<RECORD1>value1</RECORD1>
</NAME>
with this code
SET OutputRoot = InputRoot;
CREATE NEXTSIBLING OF OutputRoot.XMLNSC.NAME.RECORD2 NAME 'RECORD1' VALUE 'value1';
Please let me know how to add element to message? |
|
Back to top |
|
 |
flahunter |
Posted: Tue Jul 27, 2010 11:26 pm Post subject: |
|
|
 Acolyte
Joined: 30 Oct 2008 Posts: 62
|
Since you are using XMLNSC domain, have you set MessageDomain to 'XMLNSC' in MQInput node?
Besides, you should code as this:
Code: |
CREATE PREVIOUSSIBLING OF OutputRoot.XMLNSC.NAME.RECORD2 NAME 'RECORD1' VALUE 'value1'; |
|
|
Back to top |
|
 |
mqjeff |
Posted: Wed Jul 28, 2010 2:45 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Using PreviousSibling or NextSibling isn't going to change the fact that the path doesn't match.
Take a user trace of the code. See what it thinks the actual path to NAME.RECORD2 is, likely it's much more like ns1:NAME.ns1:RECORD2. |
|
Back to top |
|
 |
tanishka |
Posted: Wed Jul 28, 2010 3:59 am Post subject: |
|
|
Centurion
Joined: 24 Nov 2008 Posts: 144
|
flahunter,
I forgot to specify 'XMLNSC' domain in MQ input node. Now its working fine. Thanks for all your support. |
|
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
|
|
|
|