LOWER_CASE, ORIGINAL_CASE, UPPER_CASE
Modifier and Type | Method and Description |
---|---|
String |
getEncoding()
Character Encoding parsed a document with.
|
Node |
parse(InputStream is)
Parses an HTML document and return its top element.
|
Node |
parse(InputStream is,
String charEncoding)
Parses a HTML document and return its top element.
|
Node |
parseSwitchEnc(InputStream is)
Parses a HTML document and return its top element.
|
Node |
parseSwitchEnc(InputStream is,
String defaultEncoding)
Parses a HTML document and return its top element.
|
addErrorHandler, addErrorLogListener, autoGenerated, changeDefaultTagCase, elementHandle, error, getContext, getContextElements, getDocument, getErrorHandlers, getExtraErrInfo, getNode, getPushbackBufferSize, hasEndTag, keepUnknownElements, pushBackNode, reopenContext, setAttrNameCase, setContext, setCurrentNode, setDefaultTagCase, setDocumentHandler, setHasEndTag, setTagCase
Node parse(InputStream is) throws ParseException, IOException, SAXException
is
- target InputStream
to parse with default encoding.
The InputStream will be closed after parsing.PaserException
- If unrecoverable syntax or token error occurred, thrownIOException
ParseException
SAXException
Node parse(InputStream is, String charEncoding) throws SAXException, ParseException, IOException
is
- target InputStream
to parse.
The InputStream will be closed after parsing.charEncoding
- encoding used for parsePaserException
- If unrecoverable syntax or token error occurred, thrownIOException
SAXException
ParseException
Node parseSwitchEnc(InputStream is) throws ParseException, IOException, SAXException
parse(InputStream)
. If it meets
<META http-equiv="Content-Type"
content="text/html; charset=xxx">
tag in a document, it tries to change encoding to xxx
.is
- target InputStream
to parse.
The InputStream will be closed after parsing.PaserException
- If unrecoverable syntax or token error occurred, thrownIOException
ParseException
SAXException
Node parseSwitchEnc(InputStream is, String defaultEncoding) throws SAXException, ParseException, IOException
parse(InputStream,String)
If
it meets <META http-equiv="Content-Type"
content="text/html; charset=xxx">
tag in a document, it tries to change encoding to xxx
.is
- target InputStream
to parse.
The InputStream will be closed after parsing.defaultEncoding
- default encoding before switching encoding.PaserException
- If unrecoverable syntax or token error occurred, thrownIOException
SAXException
ParseException
String getEncoding()