Class HTMLConfiguration

  • All Implemented Interfaces:
    XMLComponentManager, XMLParserConfiguration

    public class HTMLConfiguration
    extends ParserConfigurationSettings
    implements XMLParserConfiguration
    An XNI-based parser configuration that can be used to parse HTML documents. This configuration can be used directly in order to parse HTML documents or can be used in conjunction with any XNI based tools, such as the Xerces2 implementation.

    This configuration recognizes the following features:

    • http://cyberneko.org/html/features/augmentations
    • http://cyberneko.org/html/features/report-errors
    • http://cyberneko.org/html/features/report-errors/simple
    • and
    • the features supported by the scanner and tag balancer components.

    This configuration recognizes the following properties:

    • http://cyberneko.org/html/properties/names/elems
    • http://cyberneko.org/html/properties/names/attrs
    • http://cyberneko.org/html/properties/filters
    • http://cyberneko.org/html/properties/error-reporter
    • and
    • the properties supported by the scanner and tag balancer.

    For complete usage information, refer to the documentation.

    See Also:
    HTMLScanner, HTMLTagBalancer, HTMLErrorReporter
    • Field Detail

      • NAMESPACES

        protected static final java.lang.String NAMESPACES
        Namespaces.
        See Also:
        Constant Field Values
      • AUGMENTATIONS

        protected static final java.lang.String AUGMENTATIONS
        Include infoset augmentations.
        See Also:
        Constant Field Values
      • REPORT_ERRORS

        protected static final java.lang.String REPORT_ERRORS
        Report errors.
        See Also:
        Constant Field Values
      • SIMPLE_ERROR_FORMAT

        protected static final java.lang.String SIMPLE_ERROR_FORMAT
        Simple report format.
        See Also:
        Constant Field Values
      • NAMES_ELEMS

        protected static final java.lang.String NAMES_ELEMS
        Modify HTML element names: { "upper", "lower", "default" }.
        See Also:
        Constant Field Values
      • NAMES_ATTRS

        protected static final java.lang.String NAMES_ATTRS
        Modify HTML attribute names: { "upper", "lower", "default" }.
        See Also:
        Constant Field Values
      • FILTERS

        public static final java.lang.String FILTERS
        Pipeline filters.
        See Also:
        Constant Field Values
      • ERROR_REPORTER

        protected static final java.lang.String ERROR_REPORTER
        Error reporter.
        See Also:
        Constant Field Values
      • ERROR_DOMAIN

        protected static final java.lang.String ERROR_DOMAIN
        Error domain.
        See Also:
        Constant Field Values
      • closeStream_

        private boolean closeStream_
        Stream opened by parser. Therefore, must close stream manually upon termination of parsing.
      • htmlComponents_

        private final java.util.List<HTMLComponent> htmlComponents_
        Components.
      • documentScanner_

        final HTMLScanner documentScanner_
        Document scanner.
      • tagBalancer_

        private final HTMLTagBalancer tagBalancer_
        HTML tag balancer.
      • namespaceBinder_

        private final NamespaceBinder namespaceBinder_
        Namespace binder.
    • Constructor Detail

      • HTMLConfiguration

        public HTMLConfiguration()
        Default constructor.
      • HTMLConfiguration

        public HTMLConfiguration​(HTMLElements htmlElements)