public static Document jsoup2DOM(org.jsoup.nodes.Document jsoupDocument){
  Document document=null;
  try {
    DocumentBuilderFactory docBuilderFactory=DocumentBuilderFactory.newInstance();
    DocumentBuilder docBuilder=docBuilderFactory.newDocumentBuilder();
    document=docBuilder.newDocument();
    Map<String,String> nsMap=new HashMap<String,String>();
    createDOM(jsoupDocument,document,document,nsMap);
  }
 catch (  ParserConfigurationException pce) {
    throw new RuntimeException(pce);
  }
  return document;
}

public static Document jsoup2DOM ( org . jsoup . nodes . Document jsoupDocument ) { Document document = null ; try { DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory . newInstance ( ) ; DocumentBuilder docBuilder = docBuilderFactory . newDocumentBuilder ( ) ; document = docBuilder . newDocument ( ) ; Map < String , String > nsMap = new HashMap < String , String > ( ) ; createDOM ( jsoupDocument , document , document , nsMap ) ; } catch ( ParserConfigurationException pce ) { throw new RuntimeException ( pce ) ; } return document ; }
returns a w3c dom that exposes the same content as the supplied jsoup document into a w3c dom .
