Method: Documatic::Component#xml

Defined in:
lib/documatic/component.rb

#xmlObject

Returns a REXML::Document constructed from the text of this component. Note that this flushes self.text: subsequently if self.text is called it will be reconstructed from this XML document and self.xml will be flushed. Therefore the content of this partial is always stored either as XML or text, never both.



44
45
46
# File 'lib/documatic/component.rb', line 44

def xml
  @xml ||= REXML::Document.new( remove_instance_variable(:@text) )
end