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 » Duplicating a section of an XML structure

Post new topic  Reply to topic
 Duplicating a section of an XML structure « View previous topic :: View next topic » 
Author Message
petervh
PostPosted: Tue Oct 02, 2007 6:30 am    Post subject: Duplicating a section of an XML structure Reply with quote

Apprentice

Joined: 15 Jun 2006
Posts: 31

I have an XML structure something like:

<a>xxx<b>yyy<c>zzz</c></b></a>

I'm trying to duplicate just the section from <b>yyy<c>zzz</c></b> on the same level as the first <b> element in a Compute node.

I've tried using CREATE NEXTSIBLING OF (ref pointer) AS (ref pointer)REPEAT and

ATTACH (ref pointer) to (ref pointer2) AS LASTCHILD

but I get an error indicating that I'm creating a loop or that I can't create an element as a sibling of an unattached element. I guess the error message makes sense, but surely there must be a simple way to do this...

Thanks
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Oct 02, 2007 6:45 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

So you're trying to create two copies of InputRoot.XMLNS.a.b?

Code:
set OutputRoot.XMLNS.a.b[1]=InputRoot.XMLNS.a.b;
Set OutputRoot.XMLNS.a.b[2] = InputRoot.XMLNS.a.b;

_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Jenney
PostPosted: Tue Oct 02, 2007 8:16 am    Post subject: Reply with quote

Voyager

Joined: 25 Apr 2007
Posts: 83
Location: Melbourne

I am trying to create an XML from CWF

is there better way to do it using Create field function, there is little complication XML element will have some repeating elements which CWF don't, Both XML and CWF has MRM

Will broker understand that and creates it automatically or I have to do it manually?

Thanks
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Oct 02, 2007 8:19 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You can't configure MRM to say "produce two copies of this element, when you serialize the logical message into a bitstream".

So you have to write code to create two logical elements.
_________________
I am *not* the model of the modern major general.


Last edited by jefflowrey on Wed Oct 03, 2007 3:24 am; edited 1 time in total
Back to top
View user's profile Send private message
petervh
PostPosted: Wed Oct 03, 2007 12:43 am    Post subject: Reply with quote

Apprentice

Joined: 15 Jun 2006
Posts: 31

Thanks Jeff
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 » Duplicating a section of an XML structure
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.