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 » Is there a FAST way to remove xml elements with childs ??

Post new topic  Reply to topic
 Is there a FAST way to remove xml elements with childs ?? « View previous topic :: View next topic » 
Author Message
Hartmut Grell
PostPosted: Fri Oct 19, 2001 1:50 am    Post subject: Reply with quote

Newbie

Joined: 11 Jul 2001
Posts: 4

How to remove elements from an xml hirarchical structure ?

<root>
<element1>
<many childs>
</element1>
<element2> <=== I want to remove this one
<many childs>
</element2>
<element3>
<many childs>
</element3>
</root>

We have very large xml structures and using "copy header only" and then assigning the needed element one by one is very time consuming. We'd like to use copy "entire message" and then remove one element with childs in an effective way. Overwriting the tree with "LIST {''}" is not our preferred solution.

Thanks for your tips


[ This Message was edited by: Hartmut Grell on 2001-10-19 03:03 ]
Back to top
View user's profile Send private message
NickB
PostPosted: Fri Oct 19, 2001 3:13 am    Post subject: Reply with quote

Centurion

Joined: 20 May 2001
Posts: 107
Location: Zurich Financial Services

The easiest way is to NULL out that part of the structure you wish to remove.

So, in your example.....

SET OutputRoot = InputRoot;
-- Enter SQL below this line. SQL above this line might be regenerated, causing any modifications to be lost.
SET OutputRoot.XML.root.element2 = NULL;


This will ensure that element2 (and everything below it) does not get copied forward to the output tree.
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 » Is there a FAST way to remove xml elements with childs ??
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.