1

I want to make a simple webpage "reader" app (absolutely not a viewer), that just needs to store the inside of some html elements in a variabile, and the page should never be visible to users.

With System.Windows.Forms, I'm able to do this thanks to WebBrowser control, using methods like Document.GetElementsByTagName(), but I can't find a good equivalent for Xamarin.Android. I'm aware of the existence of WebView control, but I don't really know if it's suitable for my situation as I have always seen it being used like a page visualizator.

Perhaps something will not be clear, in that case just let me know, and I will try to explain better. Thank you!

Redirectk
  • 160
  • 9
  • Please see this: [Parse HTML in Android](http://stackoverflow.com/questions/2188049/parse-html-in-android). – Tachyon Mar 05 '15 at 20:52
  • Yes, but how can I get html to parse without retrieving from a loaded WebView? (I mean taking it directly from the url) – Redirectk Mar 05 '15 at 20:54
  • In the above link, if you see [this answer](http://stackoverflow.com/a/4941653/2316543). You can also load the document from URL using `Document doc = Jsoup.connect("http://example.com/").get();`. – Tachyon Mar 05 '15 at 21:05
  • Also, please see this [article](http://jsoup.org/cookbook/input/load-document-from-url). – Tachyon Mar 05 '15 at 21:06
  • Thank you! But in any case I meant a pure c# solution, so I eventually found HtmlAgilityPack for it. – Redirectk Mar 06 '15 at 13:34
  • My apologies. I didn't see xamarin and C# tags in the question. Anyways, thanks for sharing your solution. – Tachyon Mar 06 '15 at 13:50

0 Answers0