Class JsoupToW3CDom

java.lang.Object
com.lucidworks.apollo.pipeline.util.JsoupToW3CDom

public class JsoupToW3CDom extends Object
Helper class to transform a Document to a org.w3c.dom.Document, for integration with toolsets that use the W3C DOM. This class is currently experimental, please provide feedback on utility and any problems experienced.
  • Field Details

  • Constructor Details

    • JsoupToW3CDom

      public JsoupToW3CDom()
  • Method Details

    • fromJsoup

      public Document fromJsoup(org.jsoup.nodes.Document in)
      Convert a jsoup Document to a W3C Document.
      Parameters:
      in - jsoup doc
      Returns:
      w3c doc
    • convert

      public void convert(org.jsoup.nodes.Document in, Document out)
      Converts a jsoup document into the provided W3C Document. If required, you can set options on the output document before converting.
      Parameters:
      in - jsoup doc
      out - w3c doc
      See Also:
      • W3CDom.fromJsoup(org.jsoup.nodes.Document)
    • asString

      public String asString(Document doc)
      Serialize a W3C document to a String.
      Parameters:
      doc - Document
      Returns:
      Document as string