Cocoa - changing XML node value

If I have an XML file whose value I want to change, as shown below:

<?xml version="1.0" encoding="UTF-8"?>
<items>
<item>
<object>First Object</object>
<description>Description One</description>
</item>
<item>
<object>Second Object</object>
<description>Description Two</description>
</item>
</items>

Are there any methods for changing, say, "Description Two" to "Description Two Modified"? Or am I somehow reloading all the data, change the desired value and then save it to a file again?

+3
source share
1 answer

Apparently, the solution to the issue is quite simple, and by changing the NSXMLElement, using any of the above elements as an element, the entire document will automatically change.

0
source

All Articles