[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

problems reading xml from a db field and using it in REXML

aidy

6/30/2008 11:52:00 AM

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::Document.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::Document.new(xml.to_s)

But I don't think to_s can handle the xml, as

puts doc

Gives me invalid characters.

Aidy