![]() |
delete node in xml and database
hi, i need some help about how to delete nodes in my xml file, here is my xml
Code:
<products>Code:
<?php |
I have fallen in love with simplexml. It does everything you need to except delete a section of code. I found that out trying to answer this for you. I next went to the old DOMDocument method to delete but had trouble identifying the item number of the section I needed to delete. (There maybe a way of finding this in the doc, but I can't do it.) So I combined the two. First the simplexml to ID the section number by "category == "switch"" or something like it. and then using the dom to delete the section.
I did it by category == "switch" but you can use category == "name". simplexml is easy to use. PHP Code:
|
thank you very much sunfighter.... that was really of great help!! :)
|
| All times are GMT +1. The time now is 08:09 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.