P
Patrick Gundlach
Hello out there,
I try to parse some xml-text with rexml:
--------------------------------------------------
#!/usr/bin/env ruby
require 'rexml/document'
include REXML
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> "
Any possibility?
Thanks,
Patrick
I try to parse some xml-text with rexml:
--------------------------------------------------
#!/usr/bin/env ruby
require 'rexml/document'
include REXML
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> "
Any possibility?
Thanks,
Patrick