However, I am having trouble when using the REXML tutorial. Should I
somehow save the output to an .xml file locally? Or should I add the
output to a string? I am not sure how to do either as I am having
trouble directing the "print" output anywhere.
Thank you and sorry for the noobness. The api I used in a ruby project
before made everything a bit too easy, so I am still learning.
-Hunter
James Britt wrote:
···
Hunter Walker wrote:
Thank you for your help, as always.
Use open-uri to fetch the XML, then load it into a REXML::Document
object.
I get the error below after a successful XML output to the debug window.
Thanks!
No such file to load -- rexml/encodings/ASCII.rb
No decoder found for encoding ASCII. Please install iconv.
c:/ruby/lib/ruby/1.8/rexml/encoding.rb:33:in `encoding='
c:/ruby/lib/ruby/1.8/rexml/source.rb:40:in `encoding='
c:/ruby/lib/ruby/1.8/rexml/parsers/baseparser.rb:202:in `pull'
c:/ruby/lib/ruby/1.8/rexml/parsers/treeparser.rb:21:in `parse'
c:/ruby/lib/ruby/1.8/rexml/document.rb:176:in `build'
c:/ruby/lib/ruby/1.8/rexml/document.rb:45:in `initialize'
C:/Documents and Settings/hwalker/Desktop/Ruby-1.rb:13:in `new'
C:/Documents and Settings/hwalker/Desktop/Ruby-1.rb:13
c:/ruby/lib/ruby/1.8/rexml/encoding.rb:33:in `encoding=': No decoder
found for encoding ASCII. Please install iconv. (Exception)
from c:/ruby/lib/ruby/1.8/rexml/source.rb:40:in `encoding='
from c:/ruby/lib/ruby/1.8/rexml/parsers/baseparser.rb:202:in `pull'
from c:/ruby/lib/ruby/1.8/rexml/parsers/treeparser.rb:21:in `parse'
from c:/ruby/lib/ruby/1.8/rexml/document.rb:176:in `build'
from c:/ruby/lib/ruby/1.8/rexml/document.rb:45:in `initialize'
from C:/Documents and Settings/hwalker/Desktop/Ruby-1.rb:13:in `new'
from C:/Documents and Settings/hwalker/Desktop/Ruby-1.rb:13