REXML raw all doesn't seem to work


I’m trying to modify the contents of an XML document (read from file,
add nodes, write to file) and I have to make sure that I do NOT escape
any characters. The REXML documentation says that you should use :raw
=> :all as such:

doc = source, { :raw => :all })

If I have doc =“Bar</
group>”, { :raw => :all }), when I do doc.write($stdout, 2), I get
“Bar”. I see that raw-all
works for Text and Element, but it doesn’t work for Document. I looked
at the source code, and I just don’t see how it could possibly work.
The Document’s context should apply to @children, yet no such code

Am I using it wrong, or is this a bug?


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs