protected XWikiDocument getDocFromXML ( File file ) throws MojoExecutionException { XWikiDocument doc ; try { doc = new XWikiDocument ( ) ; doc . fromXML ( file ) ; } catch ( Exception e ) { throw new MojoExecutionException ( String . format ( "Failed to parse [%s]." , file . getAbsolutePath ( ) ) , e ) ; } return doc ; }
Load a XWiki document from its XML representation .