public void convert ( org . jsoup . nodes . Document in , Document out ) { if ( ! StringUtil . isBlank ( in . location ( ) ) ) out . setDocumentURI ( in . location ( ) ) ; org . jsoup . nodes . Element rootEl = in . child ( 0 ) ; // skip the #root node NodeTraversor . traverse ( new W3CBuilder ( out ) , rootEl ) ; }
Converts a jsoup document into the provided W3C Document . If required you can set options on the output document before converting .