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 » Not able to add new element to output xml message.

Post new topic  Reply to topic
 Not able to add new element to output xml message. « View previous topic :: View next topic » 
Author Message
tanishka
PostPosted: Tue Jul 27, 2010 10:22 pm    Post subject: Not able to add new element to output xml message. Reply with quote

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
View user's profile Send private message
flahunter
PostPosted: Tue Jul 27, 2010 11:26 pm    Post subject: Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Wed Jul 28, 2010 2:45 am    Post subject: Reply with quote

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
View user's profile Send private message
tanishka
PostPosted: Wed Jul 28, 2010 3:59 am    Post subject: Reply with quote

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
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 » Not able to add new element to output xml message.
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.