开发者

I want to put the XML from a webpage into an NSString

开发者 https://www.devze.com 2023-02-03 14:27 出处:网络
How do i do this? Suggestions? I don\'t know how the xml p开发者_如何学Pythonage is encoded neither, if i need to know that, how do i find out?You will need an XML parser; this is a good place to get

How do i do this? Suggestions? I don't know how the xml p开发者_如何学Pythonage is encoded neither, if i need to know that, how do i find out?


You will need an XML parser; this is a good place to get started. You can then extract parts of your XML doc and save as NSStrings.


In terms of loading the XML data into an NSString, you can simply use the initWithContentsOfURL:usedEncoding:error: method of the NSString class. (That said, if you find out the encoding, simply use the initWithContentsOfURL:encoding:error: method instead.)

0

精彩评论

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