Package org.ccil.cowan.tagsoup
Class PYXWriter
java.lang.Object
org.ccil.cowan.tagsoup.PYXWriter
- All Implemented Interfaces:
ScanHandler,ContentHandler,LexicalHandler
A ContentHandler that generates PYX format instead of XML.
Primarily useful for debugging.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadup(char[] buff, int offset, int length) Reports an attribute name without a value.voidaname(char[] buff, int offset, int length) Reports an attribute name; a value will follow.voidaval(char[] buff, int offset, int length) Reports an attribute value.voidcdsect(char[] buff, int offset, int length) Reports the content of a CDATA section (not a CDATA element)voidcharacters(char[] buff, int offset, int length) voidcmnt(char[] buff, int offset, int length) Reports a comment.voidcomment(char[] ch, int start, int length) voiddecl(char[] buff, int offset, int length) Reports a invalid input: '<!'....> declaration - typically a DOCTYPEvoidendCDATA()voidvoidendDTD()voidendElement(String uri, String localname, String qname) voidvoidendPrefixMapping(String prefix) voidentity(char[] buff, int offset, int length) Reports an entity reference or character reference.voideof(char[] buff, int offset, int length) Reports EOF.voidetag(char[] buff, int offset, int length) Reports an end-tag.intReturns the value of the last entity or character reference reported.voidgi(char[] buff, int offset, int length) Reports the general identifier (element type name) of a start-tag.voidignorableWhitespace(char[] buff, int offset, int length) voidpcdata(char[] buff, int offset, int length) Reports character content.voidpi(char[] buff, int offset, int length) Reports the data part of a processing instruction.voidpitarget(char[] buff, int offset, int length) Reports the target part of a processing instruction.voidprocessingInstruction(String target, String data) voidsetDocumentLocator(Locator locator) voidskippedEntity(String name) voidstagc(char[] buff, int offset, int length) Reports the close of a start-tag.voidstage(char[] buff, int offset, int length) Reports the close of an empty-tag.voidvoidvoidvoidstartElement(String uri, String localname, String qname, Attributes atts) voidstartEntity(String name) voidstartPrefixMapping(String prefix, String uri) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandler
declaration
-
Constructor Details
-
PYXWriter
-
-
Method Details
-
adup
Description copied from interface:ScanHandlerReports an attribute name without a value.- Specified by:
adupin interfaceScanHandler- Throws:
SAXException
-
aname
Description copied from interface:ScanHandlerReports an attribute name; a value will follow.- Specified by:
anamein interfaceScanHandler- Throws:
SAXException
-
aval
Description copied from interface:ScanHandlerReports an attribute value.- Specified by:
avalin interfaceScanHandler- Throws:
SAXException
-
cmnt
Description copied from interface:ScanHandlerReports a comment.- Specified by:
cmntin interfaceScanHandler- Throws:
SAXException
-
entity
Description copied from interface:ScanHandlerReports an entity reference or character reference.- Specified by:
entityin interfaceScanHandler- Throws:
SAXException
-
getEntity
public int getEntity()Description copied from interface:ScanHandlerReturns the value of the last entity or character reference reported.- Specified by:
getEntityin interfaceScanHandler
-
eof
Description copied from interface:ScanHandlerReports EOF.- Specified by:
eofin interfaceScanHandler- Throws:
SAXException
-
etag
Description copied from interface:ScanHandlerReports an end-tag.- Specified by:
etagin interfaceScanHandler- Throws:
SAXException
-
decl
Description copied from interface:ScanHandlerReports a invalid input: '<!'....> declaration - typically a DOCTYPE- Specified by:
declin interfaceScanHandler- Throws:
SAXException
-
gi
Description copied from interface:ScanHandlerReports the general identifier (element type name) of a start-tag.- Specified by:
giin interfaceScanHandler- Throws:
SAXException
-
cdsect
Description copied from interface:ScanHandlerReports the content of a CDATA section (not a CDATA element)- Specified by:
cdsectin interfaceScanHandler- Throws:
SAXException
-
pcdata
Description copied from interface:ScanHandlerReports character content.- Specified by:
pcdatain interfaceScanHandler- Throws:
SAXException
-
pitarget
Description copied from interface:ScanHandlerReports the target part of a processing instruction.- Specified by:
pitargetin interfaceScanHandler- Throws:
SAXException
-
pi
Description copied from interface:ScanHandlerReports the data part of a processing instruction.- Specified by:
piin interfaceScanHandler- Throws:
SAXException
-
stagc
Description copied from interface:ScanHandlerReports the close of a start-tag.- Specified by:
stagcin interfaceScanHandler- Throws:
SAXException
-
stage
Description copied from interface:ScanHandlerReports the close of an empty-tag.- Specified by:
stagein interfaceScanHandler- Throws:
SAXException
-
characters
- Specified by:
charactersin interfaceContentHandler- Throws:
SAXException
-
endDocument
- Specified by:
endDocumentin interfaceContentHandler- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceContentHandler- Throws:
SAXException
-
endPrefixMapping
- Specified by:
endPrefixMappingin interfaceContentHandler- Throws:
SAXException
-
ignorableWhitespace
- Specified by:
ignorableWhitespacein interfaceContentHandler- Throws:
SAXException
-
processingInstruction
- Specified by:
processingInstructionin interfaceContentHandler- Throws:
SAXException
-
setDocumentLocator
- Specified by:
setDocumentLocatorin interfaceContentHandler
-
skippedEntity
- Specified by:
skippedEntityin interfaceContentHandler- Throws:
SAXException
-
startDocument
- Specified by:
startDocumentin interfaceContentHandler- Throws:
SAXException
-
startElement
public void startElement(String uri, String localname, String qname, Attributes atts) throws SAXException - Specified by:
startElementin interfaceContentHandler- Throws:
SAXException
-
startPrefixMapping
- Specified by:
startPrefixMappingin interfaceContentHandler- Throws:
SAXException
-
comment
- Specified by:
commentin interfaceLexicalHandler- Throws:
SAXException
-
endCDATA
- Specified by:
endCDATAin interfaceLexicalHandler- Throws:
SAXException
-
endDTD
- Specified by:
endDTDin interfaceLexicalHandler- Throws:
SAXException
-
endEntity
- Specified by:
endEntityin interfaceLexicalHandler- Throws:
SAXException
-
startCDATA
- Specified by:
startCDATAin interfaceLexicalHandler- Throws:
SAXException
-
startDTD
- Specified by:
startDTDin interfaceLexicalHandler- Throws:
SAXException
-
startEntity
- Specified by:
startEntityin interfaceLexicalHandler- Throws:
SAXException
-