public final class HTMLParser extends org.ccil.cowan.tagsoup.Parser
autoDetectorProperty, bogonsEmptyFeature, CDATAElementsFeature, defaultAttributesFeature, externalGeneralEntitiesFeature, externalParameterEntitiesFeature, ignorableWhitespaceFeature, ignoreBogonsFeature, isStandaloneFeature, lexicalHandlerParameterEntitiesFeature, lexicalHandlerProperty, namespacePrefixesFeature, namespacesFeature, resolveDTDURIsFeature, restartElementsFeature, rootBogonsFeature, scannerProperty, schemaProperty, stringInterningFeature, translateColonsFeature, unicodeNormalizationCheckingFeature, useAttributes2Feature, useEntityResolver2Feature, useLocator2Feature, validationFeature, XML11Feature, xmlnsURIsFeature
Constructor and Description |
---|
HTMLParser() |
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] ch,
int start,
int length) |
void |
endElement(String uri,
String name,
String qName) |
String |
getAuthor() |
String |
getCharset() |
String |
getContent() |
String |
getCustom1() |
String |
getCustom2() |
String |
getCustom3() |
String |
getCustom4() |
String |
getKeywords() |
String |
getSummary() |
String |
getTitle() |
boolean |
hasAuthor() |
boolean |
hasCustom1() |
boolean |
hasCustom2() |
boolean |
hasCustom3() |
boolean |
hasCustom4() |
boolean |
hasKeywords() |
void |
parse(File file,
String charset)
parse a concret url
|
void |
parse(Reader reader) |
void |
parse(Resource res,
String charset) |
void |
startElement(String uri,
String name,
String qName,
Attributes atts) |
adup, aname, aval, cdsect, cmnt, comment, decl, endCDATA, endDTD, endEntity, entity, eof, etag_basic, etag_cdata, etag, getContentHandler, getDTDHandler, getEntity, getEntityResolver, getErrorHandler, getFeature, getProperty, gi, parse, parse, pcdata, pi, pitarget, setContentHandler, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setProperty, stagc, stage, startCDATA, startDTD, startEntity
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
public HTMLParser()
public void parse(File file, String charset) throws IOException, SAXException
file
- charset
- IOException
SAXException
SAXException
public void parse(Resource res, String charset) throws IOException, SAXException
IOException
SAXException
public void parse(Reader reader) throws IOException, SAXException
IOException
SAXException
public void startElement(String uri, String name, String qName, Attributes atts) throws SAXException
startElement
in interface ContentHandler
startElement
in class DefaultHandler
SAXException
public void endElement(String uri, String name, String qName)
endElement
in interface ContentHandler
endElement
in class DefaultHandler
public void characters(char[] ch, int start, int length)
characters
in interface ContentHandler
characters
in class DefaultHandler
public String getContent()
public String getCharset()
public String getSummary()
public String getKeywords()
public boolean hasKeywords()
public boolean hasAuthor()
public boolean hasCustom1()
public boolean hasCustom2()
public boolean hasCustom3()
public boolean hasCustom4()
public String getCustom1()
public String getCustom2()
public String getCustom3()
public String getCustom4()
Copyright © 2015 Lucee