|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Adding xml tag to beginning of message... |
« View previous topic :: View next topic » |
Author |
Message
|
klabran |
Posted: Mon Jul 12, 2004 9:02 am Post subject: Adding xml tag to beginning of message... |
|
|
 Master
Joined: 19 Feb 2004 Posts: 259 Location: Flagstaff AZ
|
I am trying to add an xml tag to the beginning of a message via the create firstchild syntax but I am getting an invalid xml document error in the compute node...
Incoming....
<message>
</message>
Outgoing....
<Test>
<message>
</message>
</Test>
CREATE FIRSTCHILD OF OutputRoot.XML NAME 'Test';
What am I doing wrong? |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Jul 12, 2004 9:24 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You're trying to create a document with two root tags, that's what you're doing wrong.
Why not change your compute node to Copy Headers Only instead of Copy Entire Message, and then
Code: |
set OutputRoot.XML.Test.message = InputRoot.XML.message |
Or you could detach the message tree first, and then attach it. But it's cleaner the other way. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
klabran |
Posted: Mon Jul 12, 2004 9:30 am Post subject: |
|
|
 Master
Joined: 19 Feb 2004 Posts: 259 Location: Flagstaff AZ
|
I have alot of code with the existing OutputRoot.XML.message. syntax and I didn't want to have to modify it all to beh OutputRoot.XML.Test.message....
I thought I could be smart and add the Create statement to the end of my code to get around that....  |
|
Back to top |
|
 |
EddieA |
Posted: Mon Jul 12, 2004 9:41 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
So why not leave all the code in place, and then add Jeff's suggestion as the final node in the flow.
Or if you don't want to add another node, then Jeff's "other" suggestion (Detach/Attach) would work at the end of the existing code.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
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
|
|
|
|