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 » How to delete repeatable tags in XML

Post new topic  Reply to topic
 How to delete repeatable tags in XML « View previous topic :: View next topic » 
Author Message
Radhikab
PostPosted: Fri Mar 02, 2012 1:05 am    Post subject: How to delete repeatable tags in XML Reply with quote

Novice

Joined: 16 Nov 2011
Posts: 11

Hi,

I have a requirement like " Few tags in xml message are repeatable tags. I have to create subsetmessage for each repeatable tag. while creating output message for 1st repeatable tag i.e, allocseq I have to ignore 2nd and 3rd repeatable tag .

Below is the sample message and expected output

input msg :
Code:
<XML>
<refdetails>
<abc>24</abc>
</refdetails>
<allocseq>
<bcd>A1</bcd>
<def>B1</def>
</allocseq>
<allocseq>
<bcd>A2</bcd>
<def>B2</def>
</allocseq>
<allocseq>
<bcd>A3</bcd>
<def>B3</def>
</allocseq>
</XML>


1st result

Code:
<XML>
<refdetails>
<abc>24</abc>
</refdetails>
<allocseq>
<bcd>A1</bcd>
<def>B1</def>
</allocseq>
</XML>
2nd output:
<XML>
<refdetails>
<abc>24</abc>
</refdetails>
<allocseq>
<bcd>A2</bcd>
<def>B2</def>
</allocseq>
</XML>


3rd output:
Code:
<XML>
<refdetails>
<abc>24</abc>
</refdetails>
<allocseq>
<bcd>A3</bcd>
<def>B3</def>
</allocseq>
</XML>


I am struggling a lot for the logic.Any suggestions would be greatly appreciated.
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Mar 02, 2012 2:30 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

I'll be glad to help...once I can read your XML.
Please use the [ edit ] button and then add [ code ] tags around your XML. ( and if necessary add white space to make the structure obvious ).
Back to top
View user's profile Send private message
WGerstma
PostPosted: Fri Mar 02, 2012 1:53 pm    Post subject: Reply with quote

Acolyte

Joined: 18 Jul 2011
Posts: 55

Not sure what you have tried so far, so just a few hints.
- Look at propagate statement
- You can loop through repeatable elements, either with [index] or with a reference and MOVE REF NEXTSIBLING REPEAT NAME;
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 » How to delete repeatable tags in XML
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.