简体   繁体   中英

How to create XML String in iPhone to use in web-service requests?

I want to create XML string to be sent to server through web-service. How do I do it natively in iPhone? Or do I have to use any third party library? I was not able to download GDATA for iPhone. Any else available? Or any other way to do it?

Please help, Thanks in advance.

You can create XML file with StringWithFormat method or Some of XML parser allow write XML as well. Please refer link of Parser for writing XML

http://www.raywenderlich.com/553/how-to-chose-the-best-xml-parser-for-your-iphone-project

You can use JSON parser also....

You may want to refer to SBJSON Framework which is frequently used for objective-C, I have used this framework in may of my iOS Apps.

You may get a reference about it from these links:

https://github.com/stig/json-framework

http://stig.github.com/json-framework/

Example Code: Also here is an example on, How to parse JSON with SBJSON Parser:

How to parse JSON into Objective C - SBJSON

http://jasarien.com/?p=428

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM