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 » Changing name of a referenced element

Post new topic  Reply to topic
 Changing name of a referenced element « View previous topic :: View next topic » 
Author Message
ins0mniac2
PostPosted: Wed May 16, 2007 6:55 am    Post subject: Changing name of a referenced element Reply with quote

Apprentice

Joined: 25 Jul 2005
Posts: 33

Hi,

I am using Broker v6.
I wanted to know if it was possible to change the name of a referenced element upon attaching it to another part of a tree.

For example I have the following xml:

<test>
<test1>test1</test1>
<test2>test1</test2>
<test3>test1</test3>
<test4>test1</test4>
</test>

I would declare a reference

DECLARE myRef REFERENCE TO InputRoot.XML.test;

I then detach the reference and want to attach it to another part of XML message but name the root element differently.

<temp>
<test1>test1</test1>
<test2>test1</test2>
<test3>test1</test3>
<test4>test1</test4>
</temp>

Is this possible?

I tried playing with the ATTACH statement but didnt have any success, I could not find anything in documentation that would allow me to do so. Any help would be much appriciated.

Thanx
Back to top
View user's profile Send private message AIM Address
marcin.kasinski
PostPosted: Wed May 16, 2007 12:40 pm    Post subject: Re: Changing name of a referenced element Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

Hi,

I suggest (without testing it)


Code:
SET myRef VALUE = 'temp';

_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
ins0mniac2
PostPosted: Wed May 16, 2007 12:59 pm    Post subject: Reply with quote

Apprentice

Joined: 25 Jul 2005
Posts: 33

Doing that resets the reference and assigns it a new value of temp losing the tree that the reference previously had.
Back to top
View user's profile Send private message AIM Address
jefflowrey
PostPosted: Wed May 16, 2007 12:59 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Really, you need to use XMLNS or XMLNSC.

Also, you don't want to change the VALUE of the element, you want to change the NAME.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Wed May 16, 2007 1:11 pm    Post subject: Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

jefflowrey wrote:
Really, you need to use XMLNS or XMLNSC.

Also, you don't want to change the VALUE of the element, you want to change the NAME.


Ups sorry.
I wanted to post:

Code:
SET myRef NAME = 'temp';

_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
ins0mniac2
PostPosted: Wed May 16, 2007 2:52 pm    Post subject: Reply with quote

Apprentice

Joined: 25 Jul 2005
Posts: 33

yes the latest piece of code worked, and I was using XMLNSC, just trying to simplify the case.
Thanx a lot guys.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Changing name of a referenced element
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.