Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 04-21-2010, 10:03 AM   #1 (permalink)
Registered Member
 
Join Date: Apr 2010
Posts: 1
dconlisk is on a distinguished road
Default How can I read the source of a web-based XML document from a UIWebView?

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

Last edited by dconlisk; 04-21-2010 at 10:17 AM. Reason: added more information
dconlisk is offline   Reply With Quote
Reply

Bookmarks

Tags
iphone, sdk, uiwebview, xml

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 315
20 members and 295 guests
baja_yu, cgokey, Domele, Duncan C, Fstuff, gbenna, givensur, guusleijsten, HowEver, iphonedevshani, jbro, JoeRCruso, mdpauley, n00b, newDev, seokwon lee, SLIC, stanny, Steven.C, WheyLabs
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,648
Threads: 94,112
Posts: 402,875
Top Poster: BrianSlick (7,990)
Welcome to our newest member, brandon6031
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 07:32 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0