Class XMLWorker

    • Field Detail

      • rootpPipe

        protected final Pipeline<?> rootpPipe
      • parseHtml

        protected final boolean parseHtml
    • Constructor Detail

      • XMLWorker

        public XMLWorker​(Pipeline<?> pipeline,
                         boolean parseHtml)
        Constructs a new XMLWorker
        Parameters:
        pipeline - the pipeline
        parseHtml - true if this XMLWorker is parsing HTML, this actually just means: convert all tags to lowercase.
    • Method Detail

      • createTag

        protected Tag createTag​(String tag,
                                Map<String,​String> attr,
                                String ns)
        Creates a new Tag object from the given parameters.
        Parameters:
        tag - the tag name
        attr - the attributes
        ns - the namespace if any
        Returns:
        a Tag
      • close

        public void close()
        Description copied from interface: XMLParserListener
        Triggered when parsing is finished and the stream will be closed.
        Specified by:
        close in interface XMLParserListener
      • getCurrentTag

        protected Tag getCurrentTag()
        Returns the current tag.
        Returns:
        the current tag
      • getLocalWC

        protected static WorkerContext getLocalWC()
        Returns the local WorkerContext, beware: could be a newly initialized one, if close() or closeLocalWC() has been called before.
        Returns:
        the local WorkerContext
      • closeLocalWC

        protected static void closeLocalWC()
      • ignoreCdata

        protected boolean ignoreCdata()