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 transformation using REFERENCE

Post new topic  Reply to topic
 XML transformation using REFERENCE « View previous topic :: View next topic » 
Author Message
WBIBB
PostPosted: Thu Oct 02, 2003 12:54 pm    Post subject: XML transformation using REFERENCE Reply with quote

Novice

Joined: 24 Jul 2003
Posts: 19

Hi,

I have the following input xml to be transformed to below output xml.

1.Parent to Child transformation as seen on output for the underscore elements.
2.Moving the Root <abc> </abc> into <cde> </cde>

Code:
I/P Part of the XML which needs to be transformed   

<abc>
   <xxx>21</xxx>
   <yyy>22</yyy>
   <cde>
       <mmm>
           <efg>
               <* please do not use *>23</* please do not use *>
               <aaa_vvv>25</aaa_vvv>
               <bbb_yyy>26</bbb_yyy>
               <ccc>27</ccc>
           </efg>
           <ghi>
               <ddd>28</ddd>
               <eee_zzz>29</eee_zzz>
               <eee_www>30</eee_www>
               <fff_ppp>31</fff_ppp>
            </ghi>
         </mmm>
   </cde>
</abc>

O/P Part of the XML which needs to be transformed

   <cde>
       <mmm>
           <efg>
               <aaa>
                   <* please do not use *>23</* please do not use *>
                   <vvv>25</vvv>
               </aaa>
               <bbb>
                    <yyy>26</yyy>
               </bbb>
               <ccc>25</ccc>
           </efg>
           <ghi>
               <ddd>23</ddd>
               <eee
                  <zzz>29</zzz>
                  <www>30</www>
               </eee>
               <fff
                  <ppp>31</ppp>
               </fff>
            </ghi>
             <abc>
                  <xxx>21</xxx>
                  <yyy>22</yyy>
              <abc>
         </mmm>
   </cde>

I would appreciate your hints how I can move from siblings to Root.I have seen examples of moving within same siblings and I assume that I wil be needing 2 while loops to accomplish this..

Regards
Mike
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Oct 03, 2003 4:33 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You can disconnect the tree and reconnect the tree anywhere.

Or just use the Move reference function to do that for you.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
WBIBB
PostPosted: Fri Oct 03, 2003 5:04 am    Post subject: Reply with quote

Novice

Joined: 24 Jul 2003
Posts: 19

Hi Jeff,

Thanks for your response

1.Parent to child transformation
The elements with underscore can be done as you suggested if there are 'n' number of siblings under the parent.How will I move to next parent and look for 'n' siblings???

2.Moving Root
I did try to do it but it copies the entire tree under <abc>.However I would like to copy only the children i,e <xxx>,<yyy> within the <mmm> parent as the last child.

I would appreciate your response or anyone out there who have implemented complex transformation.The format of message is self explanatory.

Regards
Mike
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 transformation using REFERENCE
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.