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 » XML tag

Post new topic  Reply to topic
 XML tag « View previous topic :: View next topic » 
Author Message
shalini123
PostPosted: Thu Jan 08, 2004 6:05 am    Post subject: XML tag Reply with quote

Apprentice

Joined: 03 Dec 2003
Posts: 34

My msg flow is as foll:
input-rcd-map-computeoutput

my map node does the mapping between my i/p and o/p msg sets. in my compute node i want to manipulate 1 tag.

This is my code in my compute node

I want to add the value No to the foll o/p XML

<tag1>
<tag2>

---
\--
</tag2>
</tag1>
SET OutputRoot = InputRoot;
DECLARE respTag REFERENCE TO OutputRoot.XML.Tag1.Tag2;

CREATE FIRSTCHILD OF respTag NAME 'Resp' VALUE 'No';
Back to top
View user's profile Send private message
EddieA
PostPosted: Thu Jan 08, 2004 9:47 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Well it depends where in the tree you want the new tag. How about just:

Code:
SET OutputRoot = InputRoot;
SET OutputRoot.XML.Tag1.Tag2.Resp = 'No';


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
shalini123
PostPosted: Thu Jan 08, 2004 10:53 pm    Post subject: Reply with quote

Apprentice

Joined: 03 Dec 2003
Posts: 34

I want this to be a new tag after my first tag. Hence firstchild. but this is not working.

In case I do what yopu suggested: its forming the XML tag again and not in the location i want.
Back to top
View user's profile Send private message
seeknee
PostPosted: Fri Jan 09, 2004 3:07 am    Post subject: Reply with quote

Apprentice

Joined: 08 Aug 2002
Posts: 41
Location: Melbourne, Australia

If the tag is in the wrong position you could try this code

DECLARE myref REFERENCE TO OutputRoot.XML.Tag1.Tag2.Resp ;
DETACH myref;
ATTACH myref TO OutputRoot.XML.TPCIData AS FIRSTCHILD;

Hopefully this will help
Back to top
View user's profile Send private message
shalini123
PostPosted: Fri Jan 09, 2004 4:08 am    Post subject: Reply with quote

Apprentice

Joined: 03 Dec 2003
Posts: 34

No, my req is as foll:

My XML out of my map node is as follows.

<name>
<a></a>
<b>
<c></c>
</b>
</name>

I need to do some manipuilation in my compute node and insert a new tag at location a .

I tried using the foll: ESQL

SET OutputRoot = InputRoot;

DECLARE myref REFERENCE TO OutputRoot.XML.Name.a;
CREATE FIRSTCHILD OF myref NAME 'Message1' VALUE 'Hello';

But its not working.
Back to top
View user's profile Send private message
EddieA
PostPosted: Fri Jan 09, 2004 9:18 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Quote:
<name>
<a></a>
<b>
<c></c>
</b>
</name>
Which of these are from the input and which is the one you are trying to add. Please post a sample of the input and also the expected output so we can see exactly what you are trying to achieve.

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
shalini123
PostPosted: Sat Jan 10, 2004 1:04 am    Post subject: Reply with quote

Apprentice

Joined: 03 Dec 2003
Posts: 34

This is being formed from the input XML
<name>
<a></a>
<b>
<c></c>
</b>
</name>


and i need to add a new tag
Back to top
View user's profile Send private message
EddieA
PostPosted: Sat Jan 10, 2004 10:12 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Quote:
Please post a sample of the input and also the expected output


Without that we don't know what tag you want, and where in the tree you want it.

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
Missam
PostPosted: Mon Jan 12, 2004 9:39 pm    Post subject: Reply with quote

Chevalier

Joined: 16 Oct 2003
Posts: 424

Hi,
It looks like you are using pre-defined XML as both your input and output messages. you are saying that your map node takes care of mapping both i/p and o/p messages.do you really want to manipulate a tag or create a new one as your first child of the existing message.
your requirement is a bit confusing.can you explain more clearly
Thanx
sam
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 » XML tag
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.