How to add a node to an existing xml file using iphone?
In my application I need to add new element to parent node.
开发者_运维百科for Example My Xmlfile:
<person>
<Name>Thrinath</Name>
<Add>Hyd</Add>
</person>
Now I need to add new element named sal to person parent node
<person>
<Name>Thrinath</Name>
<Sal>50000</Sal>
<Add>Hyd</Add>
</person>
I know that to read XML file we have XML parser,but I dont know how to write into the XML file like my requirement.
Use some kind of DOM model to modify the XML, see for example this link.
精彩评论