write to xml file using objective c
- by Mith
Hi,
ok, I managed to read from xml file using NSXMLParser but now i don't know how to write to xml file. I have a xml file , say
<?xml version="1.0" encoding="UTF-8"?>
<root>
<user id="abcd" password="pass1"/>
<user id="efg" password="pass2"/>
</root>
Now when a new user enters details, I want to store them in a new tag.. lets say like, the id is "hhhh" and password is"pass3"
I want to add a new tag with attributes as such
<user id="hhhh" password="pass3"/>
to the xml file.
How should I do this. Please explain in an elaborate way . I am a newbie here. Any links to tutorials or examples will be much helpful.
Thanks