[libxml-devel] Subclassing XML::Document?

Mark Thomas mark at thomaszone.com
Tue Aug 26 23:01:06 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