Skip to content Skip to sidebar Skip to footer

Remove Xml Node With Jquery

I wonder whether someone may be able yo help me please. I've put together this page which allows users to view a gallery of their uploaded images. Upon initial upload, the physical

Solution 1:

This is because JavaScript(JQuery) loads the XML DOM in memory and then when you delete a node, it gets deleted from the in-memory xml doc(the object).

It wont be removed from the physical XML file.

JS runs in a sandbox Browser environment and cannot alter local files on the system. and if you are trying to load xml from a remote server then its a very bad idea.

the XML file from remote server is downloaded as temp file and then when you load XML again an in-memory DOM is created and the node is deleted from it.

So in case you want the actual file to be changed, you will need to use AJAX and send some HTTP request to your server to do the same to the physical file.

UPDATE:

Check this tutorial http://www.phpeveryday.com/articles/PHP-XML-Removing-Node-P415.html

and try to load the xml file in your delete.php and remove the corresponding node from it and then save this xml back to the original file which will be overwritten.

Post a Comment for "Remove Xml Node With Jquery"