crataegus Posted January 24, 2009 Share Posted January 24, 2009 Hi everybody, I'm quite new here and found already a lot of answers to my questions - a big "thank you" to every phpfreak! In this topic http://www.phpfreaks.com/forums/index.php/topic,227933.msg1052509.html#msg1052509 I found a very good way how to change and add nodes with simplexml. The only thing missing for my project is a way how to get rid of one node. OK, there is a way of going through every node, comparing inner values and then doing an unset() to the found node. But considering the answers in the mentioned topic I'm wondering if there is a simpler way?!? unset($xml->xpath('/A/B[@id=24]')); does not work. Only if I specify the array-number ... and that is not very comfortable when searching for special values, coming from a form. Link to comment https://forums.phpfreaks.com/topic/142274-delete-node-with-simplexml/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.