Class XMLDocumentScannerImpl.ContentDispatcher

    • Constructor Detail

      • ContentDispatcher

        protected ContentDispatcher()
    • Method Detail

      • elementDepthIsZeroHook

        protected boolean elementDepthIsZeroHook()
                                          throws IOException,
                                                 XNIException
        Element depth iz zero. This methos is a hook for subclasses to add code to handle when the element depth hits zero. When scanning a document fragment, an element depth of zero is normal. However, when scanning a full XML document, the scanner must handle the trailing miscellanous section of the document after the end of the document's root element.
        Overrides:
        elementDepthIsZeroHook in class XMLDocumentFragmentScannerImpl.FragmentContentDispatcher
        Returns:
        True if the caller should stop and return true which allows the scanner to switch to a new scanning dispatcher. A return value of false indicates that the content dispatcher should continue as normal.
        Throws:
        IOException
        XNIException
      • scanRootElementHook

        protected boolean scanRootElementHook()
                                       throws IOException,
                                              XNIException
        Scan for root element hook. This method is a hook for subclasses to add code that handles scanning for the root element. When scanning a document fragment, there is no "root" element. However, when scanning a full XML document, the scanner must handle the root element specially.
        Overrides:
        scanRootElementHook in class XMLDocumentFragmentScannerImpl.FragmentContentDispatcher
        Returns:
        True if the caller should stop and return true which allows the scanner to switch to a new scanning dispatcher. A return value of false indicates that the content dispatcher should continue as normal.
        Throws:
        IOException
        XNIException
      • resolveExternalSubsetAndRead

        protected void resolveExternalSubsetAndRead()
                                             throws IOException,
                                                    XNIException

        Attempt to locate an external subset for a document that does not otherwise have one. If an external subset is located, then it is scanned.

        Throws:
        IOException
        XNIException