@ Override public Document toDocument ( ) { // if (project == null) throw new NullPointerException("No project"); assert project != null ; DocumentFactory docFactory = new DocumentFactory ( ) ; Document document = docFactory . createDocument ( ) ; Dom4JXMLOutput treeBuilder = new Dom4JXMLOutput ( document ) ; try { writeXML ( treeBuilder ) ; } catch ( IOException e ) { // Can't happen } return document ; }
Convert the BugCollection into a dom4j Document object .