Hi all,
I am using a UIWebView to allow users of my app to browse to an XML document in a password-protected website. When they have reached the document, they then click a button outside the UIWebView. When this happens, I want to read in the XML source of the document in order to manipulate it in my app as XML.
I've gotten pretty close using:
Code:
NSString *xml = [webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.textContent"];
However this doesn't give me the XML source tags. Anyone got any ideas?
EDIT: This works for html documents but not for xml documents, it seems. Do I need to use an XML parser here?
Thanks,
David