I have 2 NSMutableArray's. One is storing a string and the other is storing a set of NSMutableArray's. So the layout looks like this:
NSMutableArrayParent {
NSMutableArrayChild {
someString
}
NSMutableArrayChild {
someString
}
NSMutableArrayChild {
someString
}
}
I wish to write this data into an XML file.
I've looked at this question but it does not specifically tell me HOW to write the XML file (in fact none of the questions here have).
I want the XML file to look something like this:
<parent name="someParentName">
<child name="someChildName">
<data>someString</data>
</child>
</parent>
Now, like the answer in the linked question, I can append to a NSMutableString and get lines like this <data>someString</data> but how can I get the closing child and closing parent tag?
I went through this tutorial but it is using GDataXML over something native to Objective C.
Also, how can I actually write this XML to disk?
I'm using Objective C with a mac.
Thanks!