public enum EXMLParserFeature extends Enum<EXMLParserFeature> implements IHasName
| Enum Constant and Description |
|---|
ALLOW_JAVA_ENCODINGS
When true: Allow Java encoding names in XMLDecl and TextDecl line.
|
AUGMENT_PSVI
When true: Augment Post-Schema-Validation-Infoset.
|
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.
|
CONTINUE_AFTER_FATAL_ERROR
When true: Attempt to continue parsing after a fatal error.
|
DISALLOW_DOCTYPE_DECL
When true: A fatal error is thrown if the incoming document contains a
DOCTYPE declaration.
|
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.
|
DOM_INCLUDE_IGNORABLE_WHITESPACE
When true: Include text nodes that can be considered "ignorable whitespace"
in the DOM tree.
|
DYNAMIC
When true: The parser will validate the document only if a grammar is
specified.
|
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. |
EXTERNAL_GENERAL_ENTITIES
When true: Include 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.
|
ID_IDREF_CHECKING
When true: Enable checking of ID/IDREF constraints.
|
IDENTITY_CONSTRAINT_CHECKING
When true: Enable 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.
|
LOAD_DTD_GRAMMAR
When true: Load the DTD and use it to add default attributes and set
attribute types when parsing.
|
LOAD_EXTERNAL_DTD
When true: Load the 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.
|
NOTIFY_BUILTIN_REFS
When true: Notifies the handler of built-in entity boundaries (e.g &)
in the document via the start/endEntity callbacks.
|
NOTIFY_CHAR_REFS
When true: Notifies the handler of character reference boundaries in the
document via the start/endEntity callbacks.
|
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.
|
SAX_NAMESPACE_PREFIXES
When true: Report the original prefixed names and attributes used for
namespace declarations.
|
SAX_PARAMETER_ENTITIES
When true: Report the beginning and end of parameter entities to a
registered LexicalHandler.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
SCHEMA
When true: Turn on XML Schema validation by inserting an XML Schema
validator into the pipeline.
|
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.
|
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.
|
VALIDATE_ANNOTATIONS
When true: Schema annotations will be laxly validated against available
schema components.
|
VALIDATION
When true: Validate the document and report validity errors.
|
WARN_ON_DUPLICATE_ATTDEF
When true: Report a warning when a duplicate attribute is re-declared.
|
WARN_ON_DUPLICATE_ENTITYDEF
When true: Report a warning for duplicate entity declaration.
|
WARN_ON_UNDECLARED_ELEMDEF
When true: Report a warning if an element referenced in a content model is
not declared.
|
XINCLUDE
When true: Enable XInclude processing.
|
XINCLUDE_FIXUP_BASE_URIS
When true: Perform base URI fixup as specified by the XInclude
Recommendation.
|
XINCLUDE_FIXUP_LANGUAGE
When true: Perform language fixup as specified by the XInclude
Recommendation.
|
| Modifier and Type | Field and Description |
|---|---|
static Map<EXMLParserFeature,Boolean> |
AVOID_DOS_SETTINGS
This map contains all necessary settings to avoid entity expansion overflow
attacks.
|
static Map<EXMLParserFeature,Boolean> |
AVOID_XML_ATTACKS
This map contains all necessary settings to avoid all known XML attacks
|
static Map<EXMLParserFeature,Boolean> |
AVOID_XXE_SETTINGS
This map contains all necessary settings to avoid XXE attacks.
|
| Modifier and Type | Method and Description |
|---|---|
void |
applyTo(DocumentBuilderFactory aDocumentBuilderFactory,
boolean bValue) |
void |
applyTo(XMLReader aParser,
boolean bValue) |
static List<EXMLParserFeature> |
getAllFeaturesOfType(EXMLParserFeatureType eFeatureType) |
EXMLParserFeatureType |
getFeatureType() |
static EXMLParserFeature |
getFromNameOrNull(String sName) |
String |
getName() |
static EXMLParserFeature |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static EXMLParserFeature[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EXMLParserFeature SECURE_PROCESSING
XMLConstants.FEATURE_SECURE_PROCESSING)public static final EXMLParserFeature NAMESPACES
public static final EXMLParserFeature USE_ENTITY_RESOLVER2
public static final EXMLParserFeature VALIDATION
public static final EXMLParserFeature DYNAMIC
VALIDATION feature.public static final EXMLParserFeature SCHEMA
public static final EXMLParserFeature SCHEMA_FULL_CHECKING
public static final EXMLParserFeature NORMALIZED_VALUE
SCHEMA
and VALIDATION features are set to true.public static final EXMLParserFeature ELEMENT_DEFAULT
SCHEMA
and VALIDATION features are set to true.public static final EXMLParserFeature AUGMENT_PSVI
public static final EXMLParserFeature IGNORE_XSI_TYPE_UNTIL_ELEMDECL
public static final EXMLParserFeature GENERATE_SYNTHETIC_ANNOTATIONS
public static final EXMLParserFeature VALIDATE_ANNOTATIONS
public static final EXMLParserFeature HONOUR_ALL_SCHEMA_LOCATIONS
public static final EXMLParserFeature EXTERNAL_GENERAL_ENTITIES
public static final EXMLParserFeature EXTERNAL_PARAMETER_ENTITIES
public static final EXMLParserFeature BALANCE_SYNTAX_TREES
public static final EXMLParserFeature ID_IDREF_CHECKING
public static final EXMLParserFeature IDENTITY_CONSTRAINT_CHECKING
public static final EXMLParserFeature UNPARSED_ENTITY_CHECKING
public static final EXMLParserFeature WARN_ON_DUPLICATE_ATTDEF
public static final EXMLParserFeature WARN_ON_UNDECLARED_ELEMDEF
public static final EXMLParserFeature WARN_ON_DUPLICATE_ENTITYDEF
public static final EXMLParserFeature ALLOW_JAVA_ENCODINGS
public static final EXMLParserFeature CONTINUE_AFTER_FATAL_ERROR
public static final EXMLParserFeature LOAD_DTD_GRAMMAR
public static final EXMLParserFeature LOAD_EXTERNAL_DTD
public static final EXMLParserFeature NOTIFY_CHAR_REFS
public static final EXMLParserFeature NOTIFY_BUILTIN_REFS
public static final EXMLParserFeature DISALLOW_DOCTYPE_DECL
public static final EXMLParserFeature STANDARD_URI_CONFORMANT
public static final EXMLParserFeature XINCLUDE
public static final EXMLParserFeature XINCLUDE_FIXUP_BASE_URIS
public static final EXMLParserFeature XINCLUDE_FIXUP_LANGUAGE
public static final EXMLParserFeature DOM_DEFER_NODE_EXPANSION
public static final EXMLParserFeature DOM_CREATE_ENTITY_REF_NODES
public static final EXMLParserFeature DOM_INCLUDE_IGNORABLE_WHITESPACE
public static final EXMLParserFeature SAX_NAMESPACE_PREFIXES
public static final EXMLParserFeature SAX_STRING_INTERNING
public static final EXMLParserFeature SAX_PARAMETER_ENTITIES
public static final EXMLParserFeature SAX_FEATURE_IS_STANDALONE
public static final EXMLParserFeature SAX_RESOLVE_DTD_URIS
public static final EXMLParserFeature SAX_UNICODE_NORMALIZATION_CHECKING
public static final EXMLParserFeature SAX_USE_ATTRIBUTES2
public static final EXMLParserFeature SAX_USE_LOCATOR2
public static final EXMLParserFeature SAX_XMLNS_URIS
public static final EXMLParserFeature SAX_IS_XML11_PARSER
public static final Map<EXMLParserFeature,Boolean> AVOID_XXE_SETTINGS
public static final Map<EXMLParserFeature,Boolean> AVOID_DOS_SETTINGS
public static final Map<EXMLParserFeature,Boolean> AVOID_XML_ATTACKS
public static EXMLParserFeature[] values()
for (EXMLParserFeature c : EXMLParserFeature.values()) System.out.println(c);
public static EXMLParserFeature valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is null@Nonnull public EXMLParserFeatureType getFeatureType()
public void applyTo(@Nonnull DocumentBuilderFactory aDocumentBuilderFactory, boolean bValue)
@Nullable public static EXMLParserFeature getFromNameOrNull(@Nullable String sName)
@Nonnull @ReturnsMutableCopy public static List<EXMLParserFeature> getAllFeaturesOfType(@Nonnull EXMLParserFeatureType eFeatureType)
Copyright © 2014–2016 Philip Helger. All rights reserved.