Nokogiri: to_s WITHOUT html surrounding's tags?

n = Nokogiri::HTML("<h1>H1</h1>")
# => <!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"

Is there a method that only outputs the stuff I've read, and not the
whole valid XHTML stuff?

Well, it's not XHTML, if you note the doctype :slight_smile: but ...

Needed output:

n = Nokogiri::HTML("<h1>H1</h1>").xpath('//h1').to_xml

=> "<h1>H1</h1>"

I would think that'd be pretty apparent from a glance at the examples
in the rdoc, btw. Just sayin' :slight_smile: