Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/libxml/hpricot.rb

Overview

Provide hpricot API for libxml. Provided by Michael Guterl, inspired by thebogles.com/blog/an-hpricot-style-interface-to-libxml

Instance Method Summary collapse

Instance Method Details

#to_libxml_docObject



5
6
7
8
9
# File 'lib/libxml/hpricot.rb', line 5

def to_libxml_doc
  xp = XML::Parser.new
  xp.string = self
  xp.parse
end