str=<<EOS
<a><b>text with <illegal characters> </b></a>
EOS
# d=Document.new(str) # barks because < and >
s=Source.new(str)
# I thought that this would give me some output
puts Element.new(s) #-> </>
--------------------------------------------------
What I'd like to have is a representation of
element: a
element: b
text: "text with <illegal characters> "
str=<<EOS
<a><b>text with <illegal characters> </b></a>
EOS
# d=Document.new(str) # barks because < and >
s=Source.new(str)
# I thought that this would give me some output
puts Element.new(s) #-> </>
--------------------------------------------------
What I'd like to have is a representation of
element: a
element: b
text: "text with <illegal characters> "
"Please be aware that all text nodes in REXML are UTF-8 encoded,
and all of your code must reflect this. You may input and output
other encodings (UTF-8, UTF-16, ISO-8859-1, and UNILE are all
supported, input and output), but within your program, you must
pass REXML UTF-8 strings."
"I can't emphasize this enough, because people do have problems
with this. REXML can't possibly alway guess correctly how your
text is encoded, so it always assumes the text is UTF-8."
</>
str=<<EOS
<a><b>text with <illegal characters> </b></a>
EOS
# d=Document.new(str) # barks because < and >
s=Source.new(str)
# I thought that this would give me some output
puts Element.new(s) #-> </>
--------------------------------------------------