• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help with HTML parsing

 
John Kwest
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

I need to take a table from a website and put it into an app. My methodology is this: connect to a site, place html into a string, place table data into a webview. I have successfully connected to the website, placed the HTML into a variable called myString and have even the loaded myString into a webview as a test.

My question is what is the best way to only load the <table> everything here </table>. In other words, I only want the table data.
I have experimented with xpath but can't seem to get it to work.
Also, looking ahead to the next step I will ultimately have to change the padding and whatnot of the table to make it look better on the device correct?

Thank you very much for your help.
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The XmlFaq points to some libraries that transform HTML to XML and so make it more amenable to processing. For a mobile app I would probably forgo HTML completely; in other words, extract all the relevant data, and then use a native GUI to display it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic