Skip to main content

Posts

Showing posts with the label nsxmldocument

how to write xml with objectiv-c and place it into an NSData object

I have been reading though heaps of the ios docs from apple, and almost every bit of code to do with xml on there requiers either creating a file with xml data in it or receiving xml over a connection then altering it. I would like to know if there is a way to just creat some xml.. maybe in a string, then convert it into a NSData object.. I know how to pass a nssting into a nsdata object.. thats not so much of a big deal.. the painfull part at the moment is getting some clear concise examples on how to create my own xml without all the other stuff that apple says you need.. I.e. file or return data. I currently have no code.. what I will likely do is create a method with some parameters that can receive some information and then pass them in to hopefully create a nice xml string/data object.. if you have any example code, suggestions links to decent tutorials that would be hugely helpfull :)