Class AbstractNodeHandler

    • Constructor Detail

      • AbstractNodeHandler

        public AbstractNodeHandler()
    • Method Detail

      • handleTextNode

        public void handleTextNode​(org.jsoup.nodes.TextNode node,
                                   DocumentConverter converter)
        Handle a child text node. The default method, implemented here, is to simply write the cleaned text directly.
        Specified by:
        handleTextNode in interface NodeHandler
        Parameters:
        node - Node to handle
        converter - Parent converter for this object.
      • handleIgnoredHTMLElement

        public void handleIgnoredHTMLElement​(org.jsoup.nodes.Element node,
                                             DocumentConverter converter)
        Handle an ignored HTMLElement. The default method here is to either write the HTMLElement as a block if it is a block element, or write it directly if it is not.
        Specified by:
        handleIgnoredHTMLElement in interface NodeHandler
        Parameters:
        node - Node to handle
        converter - Parent converter for this object.
      • prependAndRecurse

        protected void prependAndRecurse​(String prepend,
                                         org.jsoup.nodes.Element node,
                                         DocumentConverter converter,
                                         Map<String,​NodeHandler> nodes)
        Recursively processes child nodes, and prepends the given string to the output.
        Parameters:
        prepend - String to prepend
        node - Starting Node
        converter - Parent document converter
        nodes - Map of valid nodes