[libxml-devel] Subclassing XML::Document?

2008-08-27 Thread Mark Thomas
I'd like to create a subclass of XML::Document. However, I'm having trouble figuring out how I would instantiate my subclass because parsing requires Parser.parse() which returns an XML::Document instead of My::Subclass. Unfortunately, Ruby doesn't have a way of changing the class of an object.

[libxml-devel] Subclassing XML::Document?

2008-08-27 Thread Mark Thomas
I'd like to create a subclass of XML::Document. However, I'm having trouble figuring out how I would instantiate my subclass because parsing requires Parser.parse() which returns an XML::Document instead of My::Subclass. Unfortunately, Ruby doesn't have a way of changing the class of an object. A

Re: [libxml-devel] Subclassing XML::Document?

2008-08-27 Thread Dan Janowski
You may be able to produce what you want by defining a module and extending the Document with it: ardent:~ danj$ irb irb(main):001:0> class A irb(main):002:1> end => nil irb(main):003:0> module B irb(main):004:1> def hello irb(main):005:2> puts "hello" irb(main):006:2> end irb(main):007:1> end

Re: [libxml-devel] Subclassing XML::Document?

2008-08-27 Thread Charlie Savage
Hey Mark, I'd like to create a subclass of XML::Document. However, I'm having trouble figuring out how I would instantiate my subclass because parsing requires Parser.parse() which returns an XML::Document instead of My::Subclass. Unfortunately, Ruby doesn't have a way of changing the class o

[libxml-devel] REXML vuln...

2008-08-27 Thread Sean Chittenden
Not applicable to libxml, but in case anyone missed it: http://www.ruby-lang.org/en/news/2008/08/23/dos-vulnerability-in-rexml/ -sc -- Sean Chittenden [EMAIL PROTECTED] ___ libxml-devel mailing list libxml-devel@rubyforge.org http://rubyforge.org/m