Package org.ccil.cowan.tagsoup
Class HTMLScanner
- java.lang.Object
-
- org.ccil.cowan.tagsoup.HTMLScanner
-
-
Constructor Summary
Constructors Constructor Description HTMLScanner()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetColumnNumber()intgetLineNumber()StringgetPublicId()StringgetSystemId()static voidmain(String[] argv)Test procedure.voidresetDocumentLocator(String publicid, String systemid)Reset document locator, supplying systemid and publicid.voidscan(Reader r0, ScanHandler h)Scan HTML source, reporting lexical events.voidstartCDATA()A callback for the ScanHandler that allows it to force the lexer state to CDATA content (no markup is recognized except the end of element.
-
-
-
Method Detail
-
getLineNumber
public int getLineNumber()
- Specified by:
getLineNumberin interfaceLocator
-
getColumnNumber
public int getColumnNumber()
- Specified by:
getColumnNumberin interfaceLocator
-
getPublicId
public String getPublicId()
- Specified by:
getPublicIdin interfaceLocator
-
getSystemId
public String getSystemId()
- Specified by:
getSystemIdin interfaceLocator
-
resetDocumentLocator
public void resetDocumentLocator(String publicid, String systemid)
Reset document locator, supplying systemid and publicid.- Specified by:
resetDocumentLocatorin interfaceScanner- Parameters:
systemid- System idpublicid- Public id
-
scan
public void scan(Reader r0, ScanHandler h) throws IOException, SAXException
Scan HTML source, reporting lexical events.- Specified by:
scanin interfaceScanner- Parameters:
r0- Reader that provides charactersh- ScanHandler that accepts lexical events.- Throws:
IOExceptionSAXException
-
startCDATA
public void startCDATA()
A callback for the ScanHandler that allows it to force the lexer state to CDATA content (no markup is recognized except the end of element.- Specified by:
startCDATAin interfaceScanner
-
main
public static void main(String[] argv) throws IOException, SAXException
Test procedure. Reads HTML from the standard input and writes PYX to the standard output.- Throws:
IOExceptionSAXException
-
-