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 » Folderbitstream

Post new topic  Reply to topic
 Folderbitstream « View previous topic :: View next topic » 
Author Message
RAJESHRAMAKRISHNAN
PostPosted: Tue Nov 30, 2004 10:50 pm    Post subject: Folderbitstream Reply with quote

Voyager

Joined: 01 May 2004
Posts: 96

Hi ,
My requirement is like this
Input:
1. <A><A1>Name</A1></A>
OR
2. <A>Name</A>

Output:
1. <payLoad><A1>Name</A1></payLoad>
2. <payLoad>Name<payLoad>

ie what ever is there with in the tags <A></A> should appear in the payLoad tag. I am currently using FolderBitstream. This works only for the first case(<A><A1>Name</A1></A>) . I want a develop a generic piece of code which can handle both the conditions.

Thanks in advance
Rajesh
Back to top
View user's profile Send private message
kirani
PostPosted: Tue Nov 30, 2004 11:19 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Try this,

Code:

SET OutputRoot.XML.PayLoad = InputRoot.XML.*[1];

_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
RAJESHRAMAKRISHNAN
PostPosted: Thu Dec 02, 2004 5:47 am    Post subject: Reply with quote

Voyager

Joined: 01 May 2004
Posts: 96

Hi Kiran,
I am getting the same entire XML in the payLoad tag.

Out put I got was
1. <payLoad><A><A1>Name</A1></A><payLoad>
OR
2. <payLoad><A>Name</A></payLoad>

Please let me know whether there are any other methods.

Thanks
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Dec 02, 2004 5:55 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I think Kiran made a slight typo on his code.

It should be something like
Code:
Set OutputRoot.XML.PayLoad = InputRoot.XML.[1].*;


But maybe I'm forgetting my syntax and if you can do multiple anonymous references or not. I should spend some more time reading the manuals.

You could also set a reference to the first child of InputRoot.XML, and then take all children of that.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
RAJESHRAMAKRISHNAN
PostPosted: Thu Dec 02, 2004 9:15 pm    Post subject: Reply with quote

Voyager

Joined: 01 May 2004
Posts: 96

Hi Jeff,
I am still not getting the correct output. What I am planning to do is use cardinality and have two statements

ie if there is no child for <A> then normal assignment else use folderbitstream. Please let me know if it is possible with a single statement.

Thanks
Rajesh
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Dec 03, 2004 6:31 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

RAJESHRAMAKRISHNAN wrote:
Please let me know if it is possible with a single statement.


I never judge code by how many lines it takes.

Just by how readable it is.

Code:
declare thisRef reference to InputBody.[1];
set OutputRoot.XML.PayLoad = thisRef.*[];


Might work.

If I had more time today, I'd test it.
_________________
I am *not* the model of the modern major general.
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 » Folderbitstream
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.