public abstract class HTMLParserFactory
extends java.lang.Object
Constructor and Description |
---|
HTMLParserFactory() |
Modifier and Type | Method and Description |
---|---|
static void |
addHTMLParserListener(HTMLParserListener el)
Add an HTML Parser listener.
|
static boolean |
getForceLowerCase()
Return true if the current parser will support forcing the tags and attributes to lower case
|
static boolean |
getForceUpperCase()
Return true if the current parser will support forcing the tags and attributes to upper case
|
static HTMLParser |
getHTMLParser()
Returns the current selected parser.
|
static boolean |
isParserWarningsEnabled()
Returns true if parser warnings are enabled.
|
static boolean |
isPreserveTagCase()
Returns true if the current parser will preserve the case of HTML tags and attributes.
|
static boolean |
isReturnHTMLDocument()
Returns true if the current parser will return an HTMLDocument object rather than a Document object.
|
static void |
removeHTMLParserListener(HTMLParserListener el)
Remove an HTML Parser listener.
|
static void |
reset()
Resets all settings to their default values.
|
static void |
setForceLowerCase(boolean forceLower)
Specifies whether the parser should force the case of HTML tags and attributes to lower case.
|
static void |
setForceUpperCase(boolean forceUpper)
Specifies whether the parser should force the case of HTML tags and attributes to be upper case.
|
static void |
setHTMLParser(HTMLParser htmlParser)
Specifies the parser to use.
|
static void |
setParserWarningsEnabled(boolean enabled)
If true, tells the parser to display warning messages.
|
static void |
setPreserveTagCase(boolean preserveTagCase)
Specifies whether the parser should preserve the case of HTML tags and attributes.
|
static void |
setReturnHTMLDocument(boolean returnHTMLDocument)
Specifies whether the parser should return an HTMLDocument object rather than a Document object.
|
static void |
useJTidyParser()
Selects the JTidy parser, if present.
|
static void |
useNekoHTMLParser()
Selects the NekoHTML parser, if present.
|
public static void reset()
public static void useJTidyParser()
public static void useNekoHTMLParser()
public static void setHTMLParser(HTMLParser htmlParser)
public static HTMLParser getHTMLParser()
public static boolean isPreserveTagCase()
public static void setPreserveTagCase(boolean preserveTagCase)
setForceUpperCase(boolean)
or
setForceLowerCase(boolean)
public static boolean isReturnHTMLDocument()
public static void setReturnHTMLDocument(boolean returnHTMLDocument)
public static void setForceUpperCase(boolean forceUpper)
setPreserveTagCase(boolean)
or setForceLowerCase(boolean)
forceUpper
- boolean indicating whether to enable this functionalitysetReturnHTMLDocument(boolean)
,
setPreserveTagCase(boolean)
,
setForceLowerCase(boolean)
public static boolean getForceUpperCase()
public static void setForceLowerCase(boolean forceLower)
setPreserveTagCase(boolean)
or setForceUpperCase(boolean)
forceLower
- boolean indicating whether to enable this functionalitysetReturnHTMLDocument(boolean)
,
setPreserveTagCase(boolean)
,
setForceUpperCase(boolean)
public static boolean getForceLowerCase()
public static boolean isParserWarningsEnabled()
public static void setParserWarningsEnabled(boolean enabled)
public static void removeHTMLParserListener(HTMLParserListener el)
public static void addHTMLParserListener(HTMLParserListener el)