开发者

iPhone how to take data from xml over the network

I have two questions.

  1. I have my data in XML format on web server. How can i connect it and use that data.
  2. Is this secure? Can i use it in professional application开发者_运维问答?

Thanks for any sort of advice in advance.


To get xml file from url:

NSMutableString *serverURL = *xml url here*;
NSMutableURLRequest *request =[NSMutableURLRequest requestWithURL:[NSURL URLWithString:serverURL]];
[request setHTTPMethod:@"GET"];
NSData *responsedata = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];


Is it secure? It depends on how secure you need. If you're just transferring generic data, it doesn't really need to be secure. If you're transferring sensitive or personal data, then you need to (at minimum) use a secure SSL connection and some sort of authentication scheme.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜