开发者

Converting String values to xml

开发者 https://www.devze.com 2023-01-03 21:00 出处:网络
I have some string values that are retrieved 开发者_高级运维from json data. I need a process of converting this strings to xml format and Post it to a urlIf it\'s inside iPhone SDK you will have to pa

I have some string values that are retrieved 开发者_高级运维from json data. I need a process of converting this strings to xml format and Post it to a url


If it's inside iPhone SDK you will have to parse the string to convert it to XML, unless you can just post the xml as-is.

Anyway. To parse the XML, you have basically two easy options:

  1. NSXMLParser
  2. libxml2 (my preferred choice, don't know why)

Then you can use NSURLConnection class to post the information to the desired XML. There are a lot of Stackoverflow questions already covering this issue you can search and use.

You can also look at an example here.

0

精彩评论

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