# File lib/xtemplate/xml.rb, line 353 def initialize(text) @hash = nil case text when XNode @node = text when Hash,Array @node = XNode.new() value_to_xml(text, @node) else @node = parse(text) @node.prepare(nil, {:@type => true, :include => true, :template => true}) end end
# File lib/xtemplate/xml.rb, line 383 def [](path) root = to_hash() xpath(path,root) end
# File lib/xtemplate/xml.rb, line 367 def parse(text) XMLParser.new.parse(text) end
# File lib/xtemplate/xml.rb, line 371 def strip!(recursive=true) @node.strip!(recursive) end
# File lib/xtemplate/xml.rb, line 375 def to_hash() @node.to_hash() end
# File lib/xtemplate/xml.rb, line 379 def to_s() @node.to_s() end
# File lib/xtemplate/yaml.rb, line 14 def to_yaml @node.to_yaml end