I’m looking for Class or Method that will pass back a document when
given a
URL.
I looked into the URI:: Class, but couldn’t find any examples of it’s
use.
def read_xhtml_from( uri )
open( uri ) { |f| HTree.parse f }.each_child do |child|
if child.respond_to? :qualified_name
doc = “”; child.display_xml( doc )
if child.qualified_name == ‘html’
return REXML::Document.new( doc )
end
end
end
end
Okay, so. How to use it? That nice REXML way you?re already used to.
I’m looking for Class or Method that will pass back a document when given a
URL.
I looked into the URI:: Class, but couldn’t find any examples of it’s use.