Wenn i try to parse a Document that has a doctype declaration with the
saxparser i get the following message:
/Library/Ruby/Gems/1.8/gems/rails-2.0.2/lib/commands/runner.rb:45:
(eval):95:in `parse': NULL pointer given (ArgumentError)
from (eval):95
from /Library/Ruby/Site/1.8/ruby
Hi Tom,
I found a memory leak when the value of an attribute is accessed. Fix
is simple, in function ruby_xml_attr_value in ruby_xml_attr.c, need to
call xmlFree:
356,357c356,360
< if (value != NULL)
< return(rb_str_new2((const char*)value));
---
if (value != NULL) {
I have the same problem as dwTwiLighT, even, when i use parse method
before.
=
I want to check if xml received by my application (made with RoR and
libxml-ruby) via POST request is well-formed.
This is the source code of that part:
p = XML::Parser.new
p.string = params[:xml]