Reader is a feature yet to be updated. The [BUG] is working as intended, mostly because I was unsure if anything could do what you have done. I have not used expand, so I will have to look at it. In all likelihood it should be an easy fix.
Dan On Nov 4, 2007, at 16:27, Adam Nelson wrote: > I'm using libxml-ruby 0.5.2 on Ubuntu 7.10 x64 with Ruby 1.8.6. I'm > trying to use the XML::Reader method expand to extract a full > XML::Node object when I find one my program is interested in. This > works OK except when Ruby tries to garbage collect the Node object > returned by Reader.expand. I get the following error: > > [BUG] XmlNode Doc is not bound! (ruby_xml_node.c:1270) > > I was able to reproduce this using the 'simple.xml' file in the > libxml-ruby test suite. Run the following code: > > #!/usr/bin/env ruby > require 'xml/libxml' > rdr = XML::Reader.file("simple.xml") > rdr.read > rdr.expand > GC.start > rdr.close > > The GC.start line will output the BUG message above then do a core > dump. > > The message from ruby_xml_node.c line 1270 comes from the > ruby_xml_node_mark_common function. Apparently the libxml xmlNode > object has a document associated with it, but that document doesn't > have a Ruby wrapper object associated with it. > > I'm afraid Linux isn't my native development platform so I don't know > what if any additional debugging steps I can take, so I hope the code > above demonstrates the problem. > > Thanks, > Adam > _______________________________________________ > libxml-devel mailing list > libxml-devel@rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel _______________________________________________ libxml-devel mailing list libxml-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/libxml-devel