I use abstract classes for this kind of thing. 'AbstractXMLReader' would implement all the 'same code' bits and provide an abstract method definition. Then 'LocalXMLReader' and 'RemoteXMLReader'...