4

is there any way to convert an html web page to xml and get data (parsing) like the rss feed?thanks

menu_on_top
  • 2,613
  • 14
  • 44
  • 71
  • you want to convert the html to a rss feed? – Mauricio Jan 28 '11 at 21:13
  • possible duplicate of [A Good JAVA library to parse HTML, POST AND GET HTTP suitable for Mobile?](http://stackoverflow.com/questions/3590613/a-good-java-library-to-parse-html-post-and-get-http-suitable-for-mobile) – Seth Jan 28 '11 at 21:19
  • i want to convert html to xml and do xml parsing,as we do with the rss feed – menu_on_top Jan 28 '11 at 21:21

1 Answers1

4

If the html is well-formed you can use a regular SAX parser to parse the html.

Html is unfortunately often not well-formed. In that case you can first parse the html on a server using tag-soup. If this is not possible you can try using jtidy on the device.

How to parse (non well-formed) HTML in android?

Community
  • 1
  • 1
vidstige
  • 12,492
  • 9
  • 66
  • 110