开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜