Module: Libxml4r::String

Included in:
String
Defined in:
lib/libxml4r.rb

Instance Method Summary collapse

Instance Method Details

#to_xmldocObject

:call-seq:

str.to_xmldoc -> XML::Document

Returns an XML Document object, or nil if str could not be parsed as valid xml.

The resulting libxml instance can be parsed, manipulated, and converted back to a string.



208
209
210
# File 'lib/libxml4r.rb', line 208

def to_xmldoc
  return ::XML::Parser.string(self).parse
end