code: 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);
      }
docs: Converts a jsoup document into the provided W3C Document. If required, you can set options on the output document
  before converting.
  @param in jsoup doc
  @param out w3c doc
  @see org.jsoup.helper.W3CDom#fromJsoup(org.jsoup.nodes.Document)