• Post Reply Bookmark Topic Watch Topic
  • New Topic

Looking for a high-level HTML document class  RSS feed

 
Charles Knell
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been Googling around, but every class I find seems to start way too far out in the weeds. I'm looking for a high-level HTML class. Something that would have an overloaded constructor that would take as an argument a file-path in the form of a string, or a URL in the form of a string, or ... well, I think you get the idea.

It should return an object representing the HTML document at the other end of the file-path or URL, and have an interface to which I could pass an XPath in the form of a string, and return or set the value of the element or attribute at the end of that XPath.

Anyone know of one?

Thanks.
 
Garrett Rowe
Ranch Hand
Posts: 1296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is an article about using JTidy to convert HTML to XML, from there you can parse the XML into a DOM document and use XPath to traverse it. There are probably other solutions out there.
[ April 20, 2007: Message edited by: Garrett Rowe ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!