[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Remove Nodes But Keep Children
- From: David <david@semlabs.co.uk>
- To: xml-dev@lists.xml.org
- Date: Sun, 22 Feb 2009 00:38:06 +0000
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]