[libxml-devel] Subclassing XML::Document?

Mark Thomas ruby at thomaszone.com
Wed Aug 27 09:24:23 EDT 2008


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.

Any suggestions?

-- Mark.



More information about the libxml-devel mailing list