Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道如何使用 DOM 解析器解析 NSString 对象,但我不知道如何从 web 上的 xml 文件中获取该 NSString。
任何信息都有帮助。
NSString根据在线.xml文件创建:
NSString
.xml
NSURL *theURL = [NSURL URLWithString:@"http://www.website.com/feed.xml"]; NSError *error = nil; NSString *theXML = [NSString stringWithContentsOfURL:theURL encoding:NSUTF8StringEncoding error:&error];