Enum EXMLParserFeature

  • All Implemented Interfaces:
    com.helger.commons.name.IHasName, Serializable, Comparable<EXMLParserFeature>

    public enum EXMLParserFeature
    extends Enum<EXMLParserFeature>
    implements com.helger.commons.name.IHasName
    Contains constants for parser features.
    Source: http://xerces.apache.org/xerces2-j/features.html
    Author:
    Philip Helger
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ALLOW_JAVA_ENCODINGS
      When true: Allow Java encoding names in XMLDecl and TextDecl line.
      When false: Do not allow Java encoding names in XMLDecl and TextDecl line.
      AUGMENT_PSVI
      When true: Augment Post-Schema-Validation-Infoset.
      When false: Do not augment Post-Schema-Validation-Infoset.
      Default: true
      (http://apache.org/xml/features/validation/schema/augment-psvi)
      BALANCE_SYNTAX_TREES
      When true: Construct an optimal representation for DTD content models to significantly reduce the likelihood a StackOverflowError will occur when large content models are processed.
      When false: Do not invest processing time to construct an optimal representation for DTD content models.
      Default: false
      (http://apache.org/xml/features/validation/balance-syntax-trees)
      CONTINUE_AFTER_FATAL_ERROR
      When true: Attempt to continue parsing after a fatal error.
      When false: Stops parse on first fatal error.
      Default: false
      (http://apache.org/xml/features/continue-after-fatal-error)
      DISALLOW_DOCTYPE_DECL
      When true: A fatal error is thrown if the incoming document contains a DOCTYPE declaration.
      When false: DOCTYPE declaration is allowed.
      Default: false
      Note: set to true to avoid XXE - https://www.owasp.org/index.php/XML_External_Entity_%28XXE%29_Processing
      (http://apache.org/xml/features/disallow-doctype-decl)
      DOM_CREATE_ENTITY_REF_NODES
      When true: Create EntityReference nodes in the DOM tree.
      DOM_DEFER_NODE_EXPANSION
      When true: Lazily expand the DOM nodes.
      When false: Fully expand the DOM nodes.
      Default: true - In the LSParser implementation the default value of this feature is false.
      (http://apache.org/xml/features/dom/defer-node-expansion)
      DOM_INCLUDE_IGNORABLE_WHITESPACE
      When true: Include text nodes that can be considered "ignorable whitespace" in the DOM tree.
      When false: Do not include ignorable whitespace in the DOM tree.
      Default: true
      (http://apache.org/xml/features/dom/include-ignorable-whitespace)
      DYNAMIC
      When true: The parser will validate the document only if a grammar is specified.
      When false: Validation is determined by the state of the VALIDATION feature.
      Default: false
      (http://apache.org/xml/features/validation/dynamic)
      ELEMENT_DEFAULT
      When true: Send XML Schema element default values via characters()
      When false: Do not send XML Schema default values in XNI
      Default: true
      XML Schema normalized values will be exposed only if both SCHEMA and VALIDATION features are set to true.
      (http://apache.org/xml/features/validation/schema/element-default)
      EXTERNAL_GENERAL_ENTITIES
      When true: Include external general entities.
      When false: Do not include external general entities.
      Default: true
      Note: set to false to avoid XXE - https://www.owasp.org/index.php/XML_External_Entity_%28XXE%29_Processing
      (http://xml.org/sax/features/external-general-entities)
      EXTERNAL_PARAMETER_ENTITIES
      When true: Include external parameter entities and the external DTD subset.
      GENERATE_SYNTHETIC_ANNOTATIONS
      When true: Enable generation of synthetic annotations.
      HONOUR_ALL_SCHEMA_LOCATIONS
      When true: All schema location hints will be used to locate the components for a given target namespace.
      When false: Only the first schema location hint encountered by the processor will be used to locate the components for a given target namespace.
      Default: false
      (http://apache.org/xml/features/honour-all-schemaLocations)
      ID_IDREF_CHECKING
      When true: Enable checking of ID/IDREF constraints.
      When false: Disable checking of ID/IDREF constraints.
      IDENTITY_CONSTRAINT_CHECKING
      When true: Enable identity constraint checking.
      When false: Disable identity constraint checking.
      Default: true
      (http://apache.org/xml/features/validation/identity-constraint-checking)
      IGNORE_XSI_TYPE_UNTIL_ELEMDECL
      When true: xsi:type attributes will be ignored until a global element declaration has been found, at which point xsi:type attributes will be processed on the element for which the global element declaration was found as well as its descendants.
      When false: Do not ignore xsi:type attributes.
      Default: false
      (http://apache.org/xml/features/validation/schema /ignore-xsi-type-until-elemdecl)
      LOAD_DTD_GRAMMAR
      When true: Load the DTD and use it to add default attributes and set attribute types when parsing.
      When false: Build the grammar but do not use the default attributes and attribute types information it contains.
      Default: true
      (http://apache.org/xml/features/nonvalidating/load-dtd-grammar)
      LOAD_EXTERNAL_DTD
      When true: Load the external DTD.
      When false: Ignore the external DTD completely.
      Default: true
      (http://apache.org/xml/features/nonvalidating/load-external-dtd)
      NAMESPACES
      When true: Perform namespace processing: prefixes will be stripped off element and attribute names and replaced with the corresponding namespace URIs.
      NORMALIZED_VALUE
      When true: Expose via SAX and DOM XML Schema normalized values for attributes and elements.
      When false: Expose the infoset values
      Default: true
      XML Schema normalized values will be exposed only if both SCHEMA and VALIDATION features are set to true.
      (http://apache.org/xml/features/validation/schema/normalized-value)
      NOTIFY_BUILTIN_REFS
      When true: Notifies the handler of built-in entity boundaries (e.g &) in the document via the start/endEntity callbacks.
      When false: Does not notify of built-in entity boundaries.
      Default: false
      (http://apache.org/xml/features/scanner/notify-builtin-refs)
      NOTIFY_CHAR_REFS
      When true: Notifies the handler of character reference boundaries in the document via the start/endEntity callbacks.
      When false: Does not notify of character reference boundaries.
      Default: false
      (http://apache.org/xml/features/scanner/notify-char-refs)
      SAX_FEATURE_IS_STANDALONE
      When true: The document specified standalone="yes" in its XML declaration.
      SAX_IS_XML11_PARSER
      When true: The parser supports both XML 1.0 and XML 1.1.
      When false: The parser supports only XML 1.0.
      Read-only!
      SAX_NAMESPACE_PREFIXES
      When true: Report the original prefixed names and attributes used for namespace declarations.
      When false: Do not report attributes used for Namespace declarations, and optionally do not report original prefixed names.
      Default: false
      (http://xml.org/sax/features/namespace-prefixes)
      SAX_PARAMETER_ENTITIES
      When true: Report the beginning and end of parameter entities to a registered LexicalHandler.
      When false: Do not report the beginning and end of parameter entities to a registered LexicalHandler.
      Default: true
      (http://xml.org/sax/features/lexical-handler/parameter-entities)
      SAX_RESOLVE_DTD_URIS
      When true: The system identifiers passed to the notationDecl, unparsedEntityDecl, and externalEntityDecl events will be absolutized relative to their base URIs before reporting.
      When false: System identifiers in declarations will not be absolutized before reporting.
      Default: true
      (http://xml.org/sax/features/resolve-dtd-uris)
      SAX_STRING_INTERNING
      When true: All element names, prefixes, attribute names, namespace URIs, and local names are internalized using the java.lang.String#intern(String):String method.
      When false: Names are not necessarily internalized.
      Default: true
      (http://xml.org/sax/features/string-interning)
      SAX_UNICODE_NORMALIZATION_CHECKING
      When true: Perform Unicode normalization checking (as described in section 2.13 and Appendix B of the XML 1.1 Recommendation) and report normalization errors.
      When false: Do not report Unicode normalization errors.
      Default: false
      (http://xml.org/sax/features/unicode-normalization-checking)
      SAX_USE_ATTRIBUTES2
      When true: The Attributes objects passed by the parser in org.xml.sax.ContentHandler.startElement() implement the org.xml.sax.ext.Attributes2 interface.
      When false: The Attributes objects passed by the parser do not implement the org.xml.sax.ext.Attributes2 interface.
      Read-only!
      SAX_USE_LOCATOR2
      When true: The Locator objects passed by the parser in org.xml.sax.ContentHandler.setDocumentLocator() implement the org.xml.sax.ext.Locator2 interface.
      When false: The Locator objects passed by the parser do not implement the org.xml.sax.ext.Locator2 interface.
      Read-only!
      SAX_XMLNS_URIS
      When true: When the namespace-prefixes feature is set to true, namespace declaration attributes will be reported as being in the http://www.w3.org/2000/xmlns/ namespace.
      When false: Namespace declaration attributes are reported as having no namespace.
      Default: false
      (http://xml.org/sax/features/xmlns-uris)
      SCHEMA
      When true: Turn on XML Schema validation by inserting an XML Schema validator into the pipeline.
      When false: Do not report validation errors against XML Schema.
      Default: false
      (http://apache.org/xml/features/validation/schema) Default: false
      SCHEMA_FULL_CHECKING
      When true: Enable full schema grammar constraint checking, including checking which may be time-consuming or memory intensive.
      SECURE_PROCESSING
      When true: instructs the implementation to process XML securely.
      STANDARD_URI_CONFORMANT
      When true: Requires that a URI has to be provided where a URI is expected.
      UNPARSED_ENTITY_CHECKING
      When true: Check that each value of type ENTITY matches the name of an unparsed entity declared in the DTD.
      When false: Do not check that each value of type ENTITY matches the name of an unparsed entity declared in the DTD.
      Default: true
      (http://apache.org/xml/features/validation/unparsed-entity-checking)
      USE_ENTITY_RESOLVER2
      When true: The methods of the org.xml.sax.ext.EntityResolver2 interface will be used when an object implementing this interface is registered with the parser using setEntityResolver.
      When false: The methods of the org.xml.sax.ext.EntityResolver2 interface will not be used.
      Default: true
      (http://xml.org/sax/features/use-entity-resolver2)
      VALIDATE_ANNOTATIONS
      When true: Schema annotations will be laxly validated against available schema components.
      When false: Do not validate schema annotations.
      Default: false
      (http://apache.org/xml/features/validate-annotations)
      VALIDATION
      When true: Validate the document and report validity errors.
      When false: Do not report validity errors.
      Default: false
      (http://xml.org/sax/features/validation) Default: false
      WARN_ON_DUPLICATE_ATTDEF
      When true: Report a warning when a duplicate attribute is re-declared.
      When false: Do not report a warning when a duplicate attribute is re-declared.
      Default: false
      (http://apache.org/xml/features/validation/warn-on-duplicate-attdef)
      WARN_ON_DUPLICATE_ENTITYDEF
      When true: Report a warning for duplicate entity declaration.
      When false: Do not report warning for duplicate entity declaration.
      Default: false
      (http://apache.org/xml/features/warn-on-duplicate-entitydef)
      WARN_ON_UNDECLARED_ELEMDEF
      When true: Report a warning if an element referenced in a content model is not declared.
      When false: Do not report a warning if an element referenced in a content model is not declared.
      Default: false
      (http://apache.org/xml/features/validation/warn-on-undeclared-elemdef)
      XINCLUDE
      When true: Enable XInclude processing.
      When false: Do not perform XInclude processing.
      Default: false
      (http://apache.org/xml/features/xinclude)
      XINCLUDE_FIXUP_BASE_URIS
      When true: Perform base URI fixup as specified by the XInclude Recommendation.
      When false: Do not perform base URI fixup.
      XINCLUDE_FIXUP_LANGUAGE
      When true: Perform language fixup as specified by the XInclude Recommendation.
      When false: Do not perform language fixup.
    • Enum Constant Detail

      • SECURE_PROCESSING

        public static final EXMLParserFeature SECURE_PROCESSING
        When true: instructs the implementation to process XML securely. This may set limits on XML constructs to avoid conditions such as denial of service attacks.
        When false: instructs the implementation to process XML according the letter of the XML specifications ignoring security issues such as limits on XML constructs to avoid conditions such as denial of service attacks.
        Default: false
        (XMLConstants.FEATURE_SECURE_PROCESSING)
      • NAMESPACES

        public static final EXMLParserFeature NAMESPACES
        When true: Perform namespace processing: prefixes will be stripped off element and attribute names and replaced with the corresponding namespace URIs. By default, the two will simply be concatenated, but the namespace-sep core property allows the application to specify a delimiter string for separating the URI part and the local part.
        When false: Do not perform namespace processing.
        Default: true
        (http://xml.org/sax/features/namespaces)
      • USE_ENTITY_RESOLVER2

        public static final EXMLParserFeature USE_ENTITY_RESOLVER2
        When true: The methods of the org.xml.sax.ext.EntityResolver2 interface will be used when an object implementing this interface is registered with the parser using setEntityResolver.
        When false: The methods of the org.xml.sax.ext.EntityResolver2 interface will not be used.
        Default: true
        (http://xml.org/sax/features/use-entity-resolver2)
      • VALIDATION

        public static final EXMLParserFeature VALIDATION
        When true: Validate the document and report validity errors.
        When false: Do not report validity errors.
        Default: false
        (http://xml.org/sax/features/validation) Default: false
      • DYNAMIC

        public static final EXMLParserFeature DYNAMIC
        When true: The parser will validate the document only if a grammar is specified.
        When false: Validation is determined by the state of the VALIDATION feature.
        Default: false
        (http://apache.org/xml/features/validation/dynamic)
      • SCHEMA

        public static final EXMLParserFeature SCHEMA
        When true: Turn on XML Schema validation by inserting an XML Schema validator into the pipeline.
        When false: Do not report validation errors against XML Schema.
        Default: false
        (http://apache.org/xml/features/validation/schema) Default: false
      • SCHEMA_FULL_CHECKING

        public static final EXMLParserFeature SCHEMA_FULL_CHECKING
        When true: Enable full schema grammar constraint checking, including checking which may be time-consuming or memory intensive. Currently, unique particle attribution constraint checking and particle derivation restriction checking are controlled by this option.
        When false: Disable full constraint checking.
        Default: false
        (http://apache.org/xml/features/validation/schema-full-checking)
      • NORMALIZED_VALUE

        public static final EXMLParserFeature NORMALIZED_VALUE
        When true: Expose via SAX and DOM XML Schema normalized values for attributes and elements.
        When false: Expose the infoset values
        Default: true
        XML Schema normalized values will be exposed only if both SCHEMA and VALIDATION features are set to true.
        (http://apache.org/xml/features/validation/schema/normalized-value)
      • ELEMENT_DEFAULT

        public static final EXMLParserFeature ELEMENT_DEFAULT
        When true: Send XML Schema element default values via characters()
        When false: Do not send XML Schema default values in XNI
        Default: true
        XML Schema normalized values will be exposed only if both SCHEMA and VALIDATION features are set to true.
        (http://apache.org/xml/features/validation/schema/element-default)
      • AUGMENT_PSVI

        public static final EXMLParserFeature AUGMENT_PSVI
        When true: Augment Post-Schema-Validation-Infoset.
        When false: Do not augment Post-Schema-Validation-Infoset.
        Default: true
        (http://apache.org/xml/features/validation/schema/augment-psvi)
      • IGNORE_XSI_TYPE_UNTIL_ELEMDECL

        public static final EXMLParserFeature IGNORE_XSI_TYPE_UNTIL_ELEMDECL
        When true: xsi:type attributes will be ignored until a global element declaration has been found, at which point xsi:type attributes will be processed on the element for which the global element declaration was found as well as its descendants.
        When false: Do not ignore xsi:type attributes.
        Default: false
        (http://apache.org/xml/features/validation/schema /ignore-xsi-type-until-elemdecl)
      • GENERATE_SYNTHETIC_ANNOTATIONS

        public static final EXMLParserFeature GENERATE_SYNTHETIC_ANNOTATIONS
        When true: Enable generation of synthetic annotations. A synthetic annotation will be generated when a schema component has non-schema attributes but no child annotation.
        When false: Do not generate synthetic annotations.
        Default: false
        (http://apache.org/xml/features/generate-synthetic-annotations)
      • VALIDATE_ANNOTATIONS

        public static final EXMLParserFeature VALIDATE_ANNOTATIONS
        When true: Schema annotations will be laxly validated against available schema components.
        When false: Do not validate schema annotations.
        Default: false
        (http://apache.org/xml/features/validate-annotations)
      • HONOUR_ALL_SCHEMA_LOCATIONS

        public static final EXMLParserFeature HONOUR_ALL_SCHEMA_LOCATIONS
        When true: All schema location hints will be used to locate the components for a given target namespace.
        When false: Only the first schema location hint encountered by the processor will be used to locate the components for a given target namespace.
        Default: false
        (http://apache.org/xml/features/honour-all-schemaLocations)
      • EXTERNAL_GENERAL_ENTITIES

        public static final EXMLParserFeature EXTERNAL_GENERAL_ENTITIES
        When true: Include external general entities.
        When false: Do not include external general entities.
        Default: true
        Note: set to false to avoid XXE - https://www.owasp.org/index.php/XML_External_Entity_%28XXE%29_Processing
        (http://xml.org/sax/features/external-general-entities)
      • EXTERNAL_PARAMETER_ENTITIES

        public static final EXMLParserFeature EXTERNAL_PARAMETER_ENTITIES
        When true: Include external parameter entities and the external DTD subset.
        When false: Do not include external parameter entities or the external DTD subset.
        Default: true
        Note: set to false to avoid XXE - https://www.owasp.org/index.php/XML_External_Entity_%28XXE%29_Processing
        (http://xml.org/sax/features/external-parameter-entities)
      • BALANCE_SYNTAX_TREES

        public static final EXMLParserFeature BALANCE_SYNTAX_TREES
        When true: Construct an optimal representation for DTD content models to significantly reduce the likelihood a StackOverflowError will occur when large content models are processed.
        When false: Do not invest processing time to construct an optimal representation for DTD content models.
        Default: false
        (http://apache.org/xml/features/validation/balance-syntax-trees)
      • ID_IDREF_CHECKING

        public static final EXMLParserFeature ID_IDREF_CHECKING
        When true: Enable checking of ID/IDREF constraints.
        When false: Disable checking of ID/IDREF constraints. Validation will not fail if there are non-unique ID values or dangling IDREF values in the document.
        Default: true
        (http://apache.org/xml/features/validation/id-idref-checking)
      • IDENTITY_CONSTRAINT_CHECKING

        public static final EXMLParserFeature IDENTITY_CONSTRAINT_CHECKING
        When true: Enable identity constraint checking.
        When false: Disable identity constraint checking.
        Default: true
        (http://apache.org/xml/features/validation/identity-constraint-checking)
      • UNPARSED_ENTITY_CHECKING

        public static final EXMLParserFeature UNPARSED_ENTITY_CHECKING
        When true: Check that each value of type ENTITY matches the name of an unparsed entity declared in the DTD.
        When false: Do not check that each value of type ENTITY matches the name of an unparsed entity declared in the DTD.
        Default: true
        (http://apache.org/xml/features/validation/unparsed-entity-checking)
      • WARN_ON_DUPLICATE_ATTDEF

        public static final EXMLParserFeature WARN_ON_DUPLICATE_ATTDEF
        When true: Report a warning when a duplicate attribute is re-declared.
        When false: Do not report a warning when a duplicate attribute is re-declared.
        Default: false
        (http://apache.org/xml/features/validation/warn-on-duplicate-attdef)
      • WARN_ON_UNDECLARED_ELEMDEF

        public static final EXMLParserFeature WARN_ON_UNDECLARED_ELEMDEF
        When true: Report a warning if an element referenced in a content model is not declared.
        When false: Do not report a warning if an element referenced in a content model is not declared.
        Default: false
        (http://apache.org/xml/features/validation/warn-on-undeclared-elemdef)
      • WARN_ON_DUPLICATE_ENTITYDEF

        public static final EXMLParserFeature WARN_ON_DUPLICATE_ENTITYDEF
        When true: Report a warning for duplicate entity declaration.
        When false: Do not report warning for duplicate entity declaration.
        Default: false
        (http://apache.org/xml/features/warn-on-duplicate-entitydef)
      • ALLOW_JAVA_ENCODINGS

        public static final EXMLParserFeature ALLOW_JAVA_ENCODINGS
        When true: Allow Java encoding names in XMLDecl and TextDecl line.
        When false: Do not allow Java encoding names in XMLDecl and TextDecl line.
        Default: false
        (http://apache.org/xml/features/allow-java-encodings)
      • CONTINUE_AFTER_FATAL_ERROR

        public static final EXMLParserFeature CONTINUE_AFTER_FATAL_ERROR
        When true: Attempt to continue parsing after a fatal error.
        When false: Stops parse on first fatal error.
        Default: false
        (http://apache.org/xml/features/continue-after-fatal-error)
      • LOAD_DTD_GRAMMAR

        public static final EXMLParserFeature LOAD_DTD_GRAMMAR
        When true: Load the DTD and use it to add default attributes and set attribute types when parsing.
        When false: Build the grammar but do not use the default attributes and attribute types information it contains.
        Default: true
        (http://apache.org/xml/features/nonvalidating/load-dtd-grammar)
      • LOAD_EXTERNAL_DTD

        public static final EXMLParserFeature LOAD_EXTERNAL_DTD
        When true: Load the external DTD.
        When false: Ignore the external DTD completely.
        Default: true
        (http://apache.org/xml/features/nonvalidating/load-external-dtd)
      • NOTIFY_CHAR_REFS

        public static final EXMLParserFeature NOTIFY_CHAR_REFS
        When true: Notifies the handler of character reference boundaries in the document via the start/endEntity callbacks.
        When false: Does not notify of character reference boundaries.
        Default: false
        (http://apache.org/xml/features/scanner/notify-char-refs)
      • NOTIFY_BUILTIN_REFS

        public static final EXMLParserFeature NOTIFY_BUILTIN_REFS
        When true: Notifies the handler of built-in entity boundaries (e.g &) in the document via the start/endEntity callbacks.
        When false: Does not notify of built-in entity boundaries.
        Default: false
        (http://apache.org/xml/features/scanner/notify-builtin-refs)
      • DISALLOW_DOCTYPE_DECL

        public static final EXMLParserFeature DISALLOW_DOCTYPE_DECL
        When true: A fatal error is thrown if the incoming document contains a DOCTYPE declaration.
        When false: DOCTYPE declaration is allowed.
        Default: false
        Note: set to true to avoid XXE - https://www.owasp.org/index.php/XML_External_Entity_%28XXE%29_Processing
        (http://apache.org/xml/features/disallow-doctype-decl)
      • STANDARD_URI_CONFORMANT

        public static final EXMLParserFeature STANDARD_URI_CONFORMANT
        When true: Requires that a URI has to be provided where a URI is expected.
        When false: Some invalid URI's are accepted as valid values when a URI is expected. Examples include: using platform dependent file separator in place of '/'; using Windows/DOS path names like "c:\blah" and "\\host\dir\blah"; using invalid URI characters (space, for example)
        Default: false
        (http://apache.org/xml/features/standard-uri-conformant)
      • XINCLUDE

        public static final EXMLParserFeature XINCLUDE
        When true: Enable XInclude processing.
        When false: Do not perform XInclude processing.
        Default: false
        (http://apache.org/xml/features/xinclude)
      • XINCLUDE_FIXUP_BASE_URIS

        public static final EXMLParserFeature XINCLUDE_FIXUP_BASE_URIS
        When true: Perform base URI fixup as specified by the XInclude Recommendation.
        When false: Do not perform base URI fixup. The XInclude processor will not add xml:base attributes.
        Default: true
        (http://apache.org/xml/features/xinclude/fixup-base-uris)
      • XINCLUDE_FIXUP_LANGUAGE

        public static final EXMLParserFeature XINCLUDE_FIXUP_LANGUAGE
        When true: Perform language fixup as specified by the XInclude Recommendation.
        When false: Do not perform language fixup. The XInclude processor will not add xml:lang attributes.
        Default: true
        (http://apache.org/xml/features/xinclude/fixup-language)
      • DOM_DEFER_NODE_EXPANSION

        public static final EXMLParserFeature DOM_DEFER_NODE_EXPANSION
        When true: Lazily expand the DOM nodes.
        When false: Fully expand the DOM nodes.
        Default: true - In the LSParser implementation the default value of this feature is false.
        (http://apache.org/xml/features/dom/defer-node-expansion)
      • DOM_CREATE_ENTITY_REF_NODES

        public static final EXMLParserFeature DOM_CREATE_ENTITY_REF_NODES
        When true: Create EntityReference nodes in the DOM tree. The EntityReference nodes and their child nodes will be read-only.
        When false: Do not create EntityReference nodes in the DOM tree. No EntityReference nodes will be created, only the nodes corresponding to their fully expanded substitution text will be created.
        Default: true
        (http://apache.org/xml/features/dom/create-entity-ref-nodes)
      • DOM_INCLUDE_IGNORABLE_WHITESPACE

        public static final EXMLParserFeature DOM_INCLUDE_IGNORABLE_WHITESPACE
        When true: Include text nodes that can be considered "ignorable whitespace" in the DOM tree.
        When false: Do not include ignorable whitespace in the DOM tree.
        Default: true
        (http://apache.org/xml/features/dom/include-ignorable-whitespace)
      • SAX_NAMESPACE_PREFIXES

        public static final EXMLParserFeature SAX_NAMESPACE_PREFIXES
        When true: Report the original prefixed names and attributes used for namespace declarations.
        When false: Do not report attributes used for Namespace declarations, and optionally do not report original prefixed names.
        Default: false
        (http://xml.org/sax/features/namespace-prefixes)
      • SAX_STRING_INTERNING

        public static final EXMLParserFeature SAX_STRING_INTERNING
        When true: All element names, prefixes, attribute names, namespace URIs, and local names are internalized using the java.lang.String#intern(String):String method.
        When false: Names are not necessarily internalized.
        Default: true
        (http://xml.org/sax/features/string-interning)
      • SAX_PARAMETER_ENTITIES

        public static final EXMLParserFeature SAX_PARAMETER_ENTITIES
        When true: Report the beginning and end of parameter entities to a registered LexicalHandler.
        When false: Do not report the beginning and end of parameter entities to a registered LexicalHandler.
        Default: true
        (http://xml.org/sax/features/lexical-handler/parameter-entities)
      • SAX_FEATURE_IS_STANDALONE

        public static final EXMLParserFeature SAX_FEATURE_IS_STANDALONE
        When true: The document specified standalone="yes" in its XML declaration.
        When false: The document specified standalone="no" in its XML declaration or the standalone document declaration was absent.
        Read-only!
        (http://xml.org/sax/features/is-standalone)
      • SAX_RESOLVE_DTD_URIS

        public static final EXMLParserFeature SAX_RESOLVE_DTD_URIS
        When true: The system identifiers passed to the notationDecl, unparsedEntityDecl, and externalEntityDecl events will be absolutized relative to their base URIs before reporting.
        When false: System identifiers in declarations will not be absolutized before reporting.
        Default: true
        (http://xml.org/sax/features/resolve-dtd-uris)
      • SAX_UNICODE_NORMALIZATION_CHECKING

        public static final EXMLParserFeature SAX_UNICODE_NORMALIZATION_CHECKING
        When true: Perform Unicode normalization checking (as described in section 2.13 and Appendix B of the XML 1.1 Recommendation) and report normalization errors.
        When false: Do not report Unicode normalization errors.
        Default: false
        (http://xml.org/sax/features/unicode-normalization-checking)
      • SAX_USE_ATTRIBUTES2

        public static final EXMLParserFeature SAX_USE_ATTRIBUTES2
        When true: The Attributes objects passed by the parser in org.xml.sax.ContentHandler.startElement() implement the org.xml.sax.ext.Attributes2 interface.
        When false: The Attributes objects passed by the parser do not implement the org.xml.sax.ext.Attributes2 interface.
        Read-only!
        Xerces-J will always report Attributes objects that also implement org.xml.sax.ext.Attributes2 so the value of this feature will always be true.
        (http://xml.org/sax/features/use-attributes2)
      • SAX_USE_LOCATOR2

        public static final EXMLParserFeature SAX_USE_LOCATOR2
        When true: The Locator objects passed by the parser in org.xml.sax.ContentHandler.setDocumentLocator() implement the org.xml.sax.ext.Locator2 interface.
        When false: The Locator objects passed by the parser do not implement the org.xml.sax.ext.Locator2 interface.
        Read-only!
        Xerces-J will always report Locator objects that also implement org.xml.sax.ext.Locator2 so the value of this feature will always be true.
        (http://xml.org/sax/features/use-locator2)
      • SAX_XMLNS_URIS

        public static final EXMLParserFeature SAX_XMLNS_URIS
        When true: When the namespace-prefixes feature is set to true, namespace declaration attributes will be reported as being in the http://www.w3.org/2000/xmlns/ namespace.
        When false: Namespace declaration attributes are reported as having no namespace.
        Default: false
        (http://xml.org/sax/features/xmlns-uris)
      • SAX_IS_XML11_PARSER

        public static final EXMLParserFeature SAX_IS_XML11_PARSER
        When true: The parser supports both XML 1.0 and XML 1.1.
        When false: The parser supports only XML 1.0.
        Read-only!
        (http://xml.org/sax/features/xml-1.1)
    • Field Detail

      • AVOID_XXE_SETTINGS

        @CodingStyleguideUnaware
        public static final Map<EXMLParserFeature,​Boolean> AVOID_XXE_SETTINGS
        This map contains all necessary settings to avoid XXE attacks.
      • AVOID_DOS_SETTINGS

        @CodingStyleguideUnaware
        public static final Map<EXMLParserFeature,​Boolean> AVOID_DOS_SETTINGS
        This map contains all necessary settings to avoid entity expansion overflow attacks.
    • Method Detail

      • values

        public static EXMLParserFeature[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (EXMLParserFeature c : EXMLParserFeature.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static EXMLParserFeature valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getName

        @Nonnull
        @Nonempty
        public String getName()
        Specified by:
        getName in interface com.helger.commons.name.IHasName