OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
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

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

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]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS