public static enum ParseConfiguration.ElementBalancing extends Enum<ParseConfiguration.ElementBalancing>
Enumeration representing the possible actions to be taken with regard to element balancing:
NO_BALANCING: Do not perform element balancing checks at all. Events will be reported as they appear. There is no guarantee that a DOM tree can be built from the fired events though.
REQUIRE_BALANCED: Require that elements are already correctly balanced in markup, throwing an exception if not. Note that when in HTML mode, this does not require the specification of optional tags such as <tbody>. Also note that this will automatically consider the
ParseConfiguration.setNoUnmatchedCloseElementsRequired(boolean)flag to be set to true.
AUTO_OPEN_CLOSE: Auto open and close elements, which includes both those elements that, according to the HTML spec (when in HTML mode) have optional start or end tags (see http://www.w3.org/html/wg/drafts/html/master/syntax.html#optional-tags) and those that simply are unclosed at the moment a parent element needs to be closed (so their closing is forced). As an example of optional tags, the HTML5 spec establishes that <html>, <body> and <tbody> are optional, and that an <li> will close any currently open <li> elements. This is not really ill-formed code, but something allowed by the spec. All of these will be reported as auto-* events by the parser.
AUTO_CLOSE: Equivalent to
AUTO_OPEN_CLOSEbut not performing any auto-open operations, so that processing of HTML fragments is possible (no <html> or <body> elements are automatically added).
This enumeration is used at the
|Enum Constant and Description|
|Modifier and Type||Method and Description|
Returns the enum constant of this type with the specified name.
Returns an array containing the constants of this enum type, in the order they are declared.
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
public static final ParseConfiguration.ElementBalancing NO_BALANCING
public static final ParseConfiguration.ElementBalancing REQUIRE_BALANCED
public static final ParseConfiguration.ElementBalancing AUTO_OPEN_CLOSE
public static final ParseConfiguration.ElementBalancing AUTO_CLOSE
public static ParseConfiguration.ElementBalancing values()
for (ParseConfiguration.ElementBalancing c : ParseConfiguration.ElementBalancing.values()) System.out.println(c);
public static ParseConfiguration.ElementBalancing valueOf(String name)
name- the name of the enum constant to be returned.
IllegalArgumentException- if this enum type has no constant with the specified name
NullPointerException- if the argument is null
Copyright © 2017 The ATTOPARSER team. All rights reserved.