public static enum ParseConfiguration.UniqueRootElementPresence extends Enum<ParseConfiguration.UniqueRootElementPresence>
Enumeration used for determining the behaviour the parser should have with respect to the presence and number of root elements in the parsed document.
Root elements are the elements that appear at the root of the document (e.g. <html> in complete HTML documents). This enumeration allows requiring that the root element is unique always, requiring it only if a document prolog (XML Declaration or DOCTYPE) is present, or not validating this at all.
This enumeration is used at the ParseConfiguration
class.
Enum Constant | Description |
---|---|
DEPENDS_ON_PROLOG_DOCTYPE |
|
NOT_VALIDATED |
|
REQUIRED_ALWAYS |
Modifier and Type | Method | Description |
---|---|---|
boolean |
isDependsOnPrologDoctype() |
|
boolean |
isRequiredAlways() |
|
static ParseConfiguration.UniqueRootElementPresence |
valueOf(String name) |
Returns the enum constant of this type with the specified name.
|
static ParseConfiguration.UniqueRootElementPresence[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ParseConfiguration.UniqueRootElementPresence REQUIRED_ALWAYS
public static final ParseConfiguration.UniqueRootElementPresence DEPENDS_ON_PROLOG_DOCTYPE
public static final ParseConfiguration.UniqueRootElementPresence NOT_VALIDATED
public static ParseConfiguration.UniqueRootElementPresence[] values()
for (ParseConfiguration.UniqueRootElementPresence c : ParseConfiguration.UniqueRootElementPresence.values()) System.out.println(c);
public static ParseConfiguration.UniqueRootElementPresence 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 nullpublic boolean isRequiredAlways()
public boolean isDependsOnPrologDoctype()
Copyright © 2018 The ATTOPARSER team. All rights reserved.