class_body
{ "{"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "DEFAULT_MAX_ERRORS"
= "="
decimal_integer_literal "0"
; ";"
line_comment "// by default, error tracking is disabled."
field_declaration
modifiers
private "private"
type_identifier "TreeBuilder"
variable_declarator
identifier "treeBuilder"
; ";"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "maxErrors"
= "="
identifier "DEFAULT_MAX_ERRORS"
; ";"
field_declaration
modifiers
private "private"
type_identifier "ParseErrorList"
variable_declarator
identifier "errors"
; ";"
block_comment "/**\n * Create a new Parser, using the specified TreeBuil"...
constructor_declaration (+22 nodes collapsed)
method_declaration (+68 nodes collapsed)
line_comment "// gets & sets"
block_comment "/**\n * Get the TreeBuilder currently in use.\n * @ret"...
method_declaration
modifiers
public "public"
type_identifier "TreeBuilder"
identifier "getTreeBuilder"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "treeBuilder"
; ";"
} "}"
block_comment "/**\n * Update the TreeBuilder used when parsing content."...
method_declaration (+27 nodes collapsed)
block_comment "/**\n * Check if parse error tracking is enabled.\n * "...
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "isTrackErrors"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
binary_expression
identifier "maxErrors"
> ">"
decimal_integer_literal "0"
; ";"
} "}"
block_comment "/**\n * Enable or disable parse error tracking for the ne"...
method_declaration (+28 nodes collapsed)
block_comment "/**\n * Retrieve the parse errors, if any, from the last "...
method_declaration
modifiers
public "public"
generic_type
type_identifier "List"
type_arguments
< "<"
type_identifier "ParseError"
> ">"
identifier "getErrors"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "errors"
; ";"
} "}"
line_comment "// static parse functions below"
block_comment "/**\n * Parse HTML into a Document.\n *\n * @param "...
method_declaration (+52 nodes collapsed)
block_comment "/**\n * Parse a fragment of HTML into a list of nodes. Th"...
method_declaration (+63 nodes collapsed)
block_comment "/**\n * Parse a fragment of HTML into the {@code body} of"...
method_declaration (+123 nodes collapsed)
block_comment "/**\n * Utility method to unescape HTML entities from a s"...
method_declaration
modifiers
public "public"
static "static"
type_identifier "String"
identifier "unescapeEntities"
formal_parameters
( "("
formal_parameter
type_identifier "String"
identifier "string"
, ","
formal_parameter
boolean_type "boolean"
identifier "inAttribute"
) ")"
block
{ "{"
local_variable_declaration
type_identifier "Tokeniser"
variable_declarator
identifier "tokeniser"
= "="
object_creation_expression
new "new"
type_identifier "Tokeniser"
argument_list
( "("
object_creation_expression
new "new"
type_identifier "CharacterReader"
argument_list
( "("
identifier "string"
) ")"
, ","
method_invocation
identifier "ParseErrorList"
. "."
identifier "noTracking"
argument_list
( "("
) ")"
) ")"
; ";"
return_statement
return "return"
method_invocation
identifier "tokeniser"
. "."
identifier "unescapeEntities"
argument_list
( "("
identifier "inAttribute"
) ")"
; ";"
} "}"
block_comment "/**\n * @param bodyHtml HTML to parse\n * @param baseU"...
method_declaration (+30 nodes collapsed)
line_comment "// builders"
block_comment "/**\n * Create a new HTML parser. This parser treats inpu"...
method_declaration (+27 nodes collapsed)
block_comment "/**\n * Create a new XML parser. This parser assumes no k"...
method_declaration (+27 nodes collapsed)
} "}"