Class: WiseML::WiseML
Constant Summary collapse
- NAMESPACE =
"http://wisebed.eu/ns/wiseml/1.0"
Instance Method Summary collapse
Instance Method Details
#to_s ⇒ Object
28 29 30 |
# File 'lib/wiseml/wiseml.rb', line 28 def to_s to_xmldoc.root.to_s end |
#to_xmldoc ⇒ Object
17 18 19 20 21 22 |
# File 'lib/wiseml/wiseml.rb', line 17 def to_xmldoc doc = Nokogiri::XML::Document.new doc.root = self.to_xml doc.root.add_namespace_definition(nil, NAMESPACE) doc end |
#write_to(string_or_io) ⇒ Object
24 25 26 |
# File 'lib/wiseml/wiseml.rb', line 24 def write_to(string_or_io) to_xmldoc.write_to(string_or_io, :encoding => 'UTF-8') end |