[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Remove Nodes But Keep Children

  • From: David <david@s...>
  • To: xml-dev@l...
  • Date: Sun, 22 Feb 2009 00:38:06 +0000

Remove Nodes But Keep Children
Hi, I am using libxml though PHP 5.2.4, I have a document, which has
nodes which belong to a namespace in it as well as nodes with no prefix.
I would like to remove all the namespace nodes, but keep all of the
nodes with no prefix, however I am not sure what is the best way yo do
this.

Here is a paste of what my XML looks like:

I would like to delete all the nodes in the xfl namespace, but the only
way I managed to do this was by going through it repeatedly until they
were all gone at every depth. The only other way I could think of
removing them is by cloning the document, but leaving out the xfl nodes,
which would involve traversing the whole thing.

Is there any particular way that is advisable to achieve this. I would
like the solution that will be quickest and eat up the least system
resources.

Thanks in advance.


-- 
 
      ,'/:.          David
    ,'-/::::.        http://semlabs.co.uk/
  ,'--/::(@)::.      
,'---/::::::::::.    
____/:::::::::::::.  
 A F F I L I A T I 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.