Mann
Mann

Reputation: 5507

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.

Upvotes: 0

Views: 60

Answers (2)

Jason
Jason

Reputation: 89129

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.

Upvotes: 0

Derek Li
Derek Li

Reputation: 3111

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];

Upvotes: 1

Related Questions