[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|