Extracting Work::XmlParser#document method