Class EmbeddedContentHandler

  • All Implemented Interfaces:
    org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

    public class EmbeddedContentHandler
    extends ContentHandlerDecorator
    Content handler decorator that prevents the startDocument() and endDocument() events from reaching the decorated handler. This is useful when you want to direct the results of parsing multiple different XML documents into a single target document without worrying about the startDocument() and endDocument() methods being called more than once.
    • Constructor Detail

      • EmbeddedContentHandler

        public EmbeddedContentHandler​(org.xml.sax.ContentHandler handler)
        Created a decorator that prevents the given handler from receiving startDocument() and endDocument() events.
        Parameters:
        handler - the content handler to be decorated
    • Method Detail

      • startDocument

        public void startDocument()
        Ignored.
        Specified by:
        startDocument in interface org.xml.sax.ContentHandler
        Overrides:
        startDocument in class ContentHandlerDecorator
      • endDocument

        public void endDocument()
        Ignored.
        Specified by:
        endDocument in interface org.xml.sax.ContentHandler
        Overrides:
        endDocument in class ContentHandlerDecorator