Skip to content Skip to sidebar Skip to footer

How To Delete Nodes From Xml File?

I want to manipulate a data from an XML file with Appcelerator's app. So I'm able to read the information from this xml file with this code: var file = Ti.Filesystem.getFile(Ti.Fil

Solution 1:

After you've used parseString you get an XML Document which has tons of methods you can use. Look at the documentation what you can use.

For example, you can use the removeChild method to remove a child element which basically is what you're asking.

Once you've removed it, parse the XML document back to a string and update the file using the filesystem API's

Post a Comment for "How To Delete Nodes From Xml File?"