开发者

To test working of xml in iphone?

HI can i place both xml files and images that the xml file transports in xcode to test the working since i don't have the internet ? If it can be done , what should be the path name for the xml to be coded i开发者_如何学编程n program and images to be typed in xml.?


NSString *stringToXML = [[NSBundle mainBundle] pathForResource:@"theXMLDoc" ofType:@"xml"];
NSURL *XMLURL = [NSURL fileURLWithPath:stringToXML];

Using that you can get XML documents from the resource folder and use them.

Just substitute your url in your code for the variable XMLURL and you should be fine. Its the same for images, you just need to make an NSURL out of the path resource.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜