Package org.w3c.tidy
Class ParserImpl
java.lang.Object
org.w3c.tidy.ParserImpl
HTML Parser implementation.
- Version:
- $Revision: 1100 $ ($Author: aditsu $)
- Author:
- Dave Raggett dsr@w3.org , Andy Quick ac.quick@sympatico.ca (translation to Java), Fabrizio Giustina
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Parser for block elements.static class
Parser for BODY.static class
Parser for COLGROUP.static class
Parser for DEFLIST.static class
Parser for empty elements.static class
Parser for FRAMESET.static class
Parser for HEAD.static class
Parser for HTML.static class
Parser for INLINE.static class
Parser for LIST.static class
Parser for NOFRAMES.static class
Parser for OPTGROUP.static class
Parser for PRE.static class
Parser for ROW.static class
Parser for ROWGROUP.static class
Parser for SCRIPT.static class
Parser for SELECT.static class
Parser for TABLE.static class
Parser for text nodes.static class
Parser for TITLE. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Parser
parser for block elements.static final Parser
parser for body.static final Parser
parser for colgroup.static final Parser
parser for definition lists.static final Parser
parser for empty elements.static final Parser
parser for frameset.static final Parser
parser for head.static final Parser
parser for html.static final Parser
parser for inline.static final Parser
parser for list.static final Parser
parser for noframes.static final Parser
parser for optgroup.static final Parser
parser for pre.static final Parser
parser for row.static final Parser
parser for rowgroup.static final Parser
parser for script.static final Parser
parser for select.static final Parser
parser for table.static final Parser
parser for text.static final Parser
parser for title. -
Method Summary
Modifier and TypeMethodDescriptionprotected static void
moveToHead
(Lexer lexer, Node element, Node node) Move node to the head, where element is used as starting point in hunt for head.static Node
parseDocument
(Lexer lexer) HTML is the top level element.protected static void
static Node
parseXMLDocument
(Lexer lexer) static void
parseXMLElement
(Lexer lexer, Node element, short mode) XML documents.static boolean
XMLPreserveWhiteSpace
(Node element, TagTable tt) Indicates whether or not whitespace should be preserved for this element.
-
Field Details
-
HTML
parser for html. -
HEAD
parser for head. -
TITLE
parser for title. -
SCRIPT
parser for script. -
BODY
parser for body. -
FRAMESET
parser for frameset. -
INLINE
parser for inline. -
LIST
parser for list. -
DEFLIST
parser for definition lists. -
PRE
parser for pre. -
BLOCK
parser for block elements. -
TABLETAG
parser for table. -
COLGROUP
parser for colgroup. -
ROWGROUP
parser for rowgroup. -
ROW
parser for row. -
NOFRAMES
parser for noframes. -
SELECT
parser for select. -
TEXT
parser for text. -
EMPTY
parser for empty elements. -
OPTGROUP
parser for optgroup.
-
-
Method Details
-
parseTag
- Parameters:
lexer
-node
-mode
-
-
moveToHead
Move node to the head, where element is used as starting point in hunt for head. Normally called during parsing.- Parameters:
lexer
-element
-node
-
-
parseDocument
HTML is the top level element. -
XMLPreserveWhiteSpace
Indicates whether or not whitespace should be preserved for this element. If anxml:space
attribute is found, then if the attribute value ispreserve
, returnstrue
. For any other value, returnsfalse
. If anxml:space
attribute was not found, then the following element names result in a return value oftrue: pre, script, style,
andxsl:text
. Finally, if aTagTable
was passed in and the element appears as the "pre" element in theTagTable
, thentrue
will be returned. Otherwise,false
is returned.- Parameters:
element
- TheNode
to test to see if whitespace should be preserved.tt
- TheTagTable
to test for thegetNodePre()
function. This may benull
, in which case this test is bypassed.- Returns:
true
orfalse
, as explained above.
-
parseXMLElement
XML documents. -
parseXMLDocument
-