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 » Adding xml tag to beginning of message...

Post new topic  Reply to topic
 Adding xml tag to beginning of message... « View previous topic :: View next topic » 
Author Message
klabran
PostPosted: Mon Jul 12, 2004 9:02 am    Post subject: Adding xml tag to beginning of message... Reply with quote

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
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Mon Jul 12, 2004 9:24 am    Post subject: Reply with quote

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
View user's profile Send private message
klabran
PostPosted: Mon Jul 12, 2004 9:30 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
EddieA
PostPosted: Mon Jul 12, 2004 9:41 am    Post subject: Reply with quote

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
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 » Adding xml tag to beginning of 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.