A
aidy
I have pulled some xml from a field in the database
However, when I try to use that xml in REXML
require 'rexml/document'
doc = REXML:ocument.new(xml)
I recieve this exception
c:/ruby/lib/ruby/1.8/rexml/source.rb:20:in `create_from': undefined
local variable or method `source' for REXML::SourceFactory:Class
(NameError)
This below does no raise an exception
doc = REXML:ocument.new(xml.to_s)
But I don't think to_s can handle the xml, as
puts doc
Gives me invalid characters.
Aidy
However, when I try to use that xml in REXML
require 'rexml/document'
doc = REXML:ocument.new(xml)
I recieve this exception
c:/ruby/lib/ruby/1.8/rexml/source.rb:20:in `create_from': undefined
local variable or method `source' for REXML::SourceFactory:Class
(NameError)
This below does no raise an exception
doc = REXML:ocument.new(xml.to_s)
But I don't think to_s can handle the xml, as
puts doc
Gives me invalid characters.
Aidy