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 TypeMethodDescriptionvoid
adup
(char[] buff, int offset, int length) Reports an attribute name without a value.void
aname
(char[] buff, int offset, int length) Reports an attribute name; a value will follow.void
aval
(char[] buff, int offset, int length) Reports an attribute value.void
cdsect
(char[] buff, int offset, int length) Reports the content of a CDATA section (not a CDATA element)void
characters
(char[] buff, int offset, int length) void
cmnt
(char[] buff, int offset, int length) Reports a comment.void
comment
(char[] ch, int start, int length) void
decl
(char[] buff, int offset, int length) Reports a <!....> declaration - typically a DOCTYPEvoid
endCDATA()
void
void
endDTD()
void
endElement
(String uri, String localname, String qname) void
void
endPrefixMapping
(String prefix) void
entity
(char[] buff, int offset, int length) Reports an entity reference or character reference.void
eof
(char[] buff, int offset, int length) Reports EOF.void
etag
(char[] buff, int offset, int length) Reports an end-tag.int
Returns the value of the last entity or character reference reported.void
gi
(char[] buff, int offset, int length) Reports the general identifier (element type name) of a start-tag.void
ignorableWhitespace
(char[] buff, int offset, int length) void
pcdata
(char[] buff, int offset, int length) Reports character content.void
pi
(char[] buff, int offset, int length) Reports the data part of a processing instruction.void
pitarget
(char[] buff, int offset, int length) Reports the target part of a processing instruction.void
processingInstruction
(String target, String data) void
setDocumentLocator
(Locator locator) void
skippedEntity
(String name) void
stagc
(char[] buff, int offset, int length) Reports the close of a start-tag.void
stage
(char[] buff, int offset, int length) Reports the close of an empty-tag.void
void
void
void
startElement
(String uri, String localname, String qname, Attributes atts) void
startEntity
(String name) void
startPrefixMapping
(String prefix, String uri) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
Constructor Details
-
PYXWriter
-
-
Method Details
-
adup
Description copied from interface:ScanHandler
Reports an attribute name without a value.- Specified by:
adup
in interfaceScanHandler
- Throws:
SAXException
-
aname
Description copied from interface:ScanHandler
Reports an attribute name; a value will follow.- Specified by:
aname
in interfaceScanHandler
- Throws:
SAXException
-
aval
Description copied from interface:ScanHandler
Reports an attribute value.- Specified by:
aval
in interfaceScanHandler
- Throws:
SAXException
-
cmnt
Description copied from interface:ScanHandler
Reports a comment.- Specified by:
cmnt
in interfaceScanHandler
- Throws:
SAXException
-
entity
Description copied from interface:ScanHandler
Reports an entity reference or character reference.- Specified by:
entity
in interfaceScanHandler
- Throws:
SAXException
-
getEntity
public int getEntity()Description copied from interface:ScanHandler
Returns the value of the last entity or character reference reported.- Specified by:
getEntity
in interfaceScanHandler
-
eof
Description copied from interface:ScanHandler
Reports EOF.- Specified by:
eof
in interfaceScanHandler
- Throws:
SAXException
-
etag
Description copied from interface:ScanHandler
Reports an end-tag.- Specified by:
etag
in interfaceScanHandler
- Throws:
SAXException
-
decl
Description copied from interface:ScanHandler
Reports a <!....> declaration - typically a DOCTYPE- Specified by:
decl
in interfaceScanHandler
- Throws:
SAXException
-
gi
Description copied from interface:ScanHandler
Reports the general identifier (element type name) of a start-tag.- Specified by:
gi
in interfaceScanHandler
- Throws:
SAXException
-
cdsect
Description copied from interface:ScanHandler
Reports the content of a CDATA section (not a CDATA element)- Specified by:
cdsect
in interfaceScanHandler
- Throws:
SAXException
-
pcdata
Description copied from interface:ScanHandler
Reports character content.- Specified by:
pcdata
in interfaceScanHandler
- Throws:
SAXException
-
pitarget
Description copied from interface:ScanHandler
Reports the target part of a processing instruction.- Specified by:
pitarget
in interfaceScanHandler
- Throws:
SAXException
-
pi
Description copied from interface:ScanHandler
Reports the data part of a processing instruction.- Specified by:
pi
in interfaceScanHandler
- Throws:
SAXException
-
stagc
Description copied from interface:ScanHandler
Reports the close of a start-tag.- Specified by:
stagc
in interfaceScanHandler
- Throws:
SAXException
-
stage
Description copied from interface:ScanHandler
Reports the close of an empty-tag.- Specified by:
stage
in interfaceScanHandler
- Throws:
SAXException
-
characters
- Specified by:
characters
in interfaceContentHandler
- Throws:
SAXException
-
endDocument
- Specified by:
endDocument
in interfaceContentHandler
- Throws:
SAXException
-
endElement
- Specified by:
endElement
in interfaceContentHandler
- Throws:
SAXException
-
endPrefixMapping
- Specified by:
endPrefixMapping
in interfaceContentHandler
- Throws:
SAXException
-
ignorableWhitespace
- Specified by:
ignorableWhitespace
in interfaceContentHandler
- Throws:
SAXException
-
processingInstruction
- Specified by:
processingInstruction
in interfaceContentHandler
- Throws:
SAXException
-
setDocumentLocator
- Specified by:
setDocumentLocator
in interfaceContentHandler
-
skippedEntity
- Specified by:
skippedEntity
in interfaceContentHandler
- Throws:
SAXException
-
startDocument
- Specified by:
startDocument
in interfaceContentHandler
- Throws:
SAXException
-
startElement
public void startElement(String uri, String localname, String qname, Attributes atts) throws SAXException - Specified by:
startElement
in interfaceContentHandler
- Throws:
SAXException
-
startPrefixMapping
- Specified by:
startPrefixMapping
in interfaceContentHandler
- Throws:
SAXException
-
comment
- Specified by:
comment
in interfaceLexicalHandler
- Throws:
SAXException
-
endCDATA
- Specified by:
endCDATA
in interfaceLexicalHandler
- Throws:
SAXException
-
endDTD
- Specified by:
endDTD
in interfaceLexicalHandler
- Throws:
SAXException
-
endEntity
- Specified by:
endEntity
in interfaceLexicalHandler
- Throws:
SAXException
-
startCDATA
- Specified by:
startCDATA
in interfaceLexicalHandler
- Throws:
SAXException
-
startDTD
- Specified by:
startDTD
in interfaceLexicalHandler
- Throws:
SAXException
-
startEntity
- Specified by:
startEntity
in interfaceLexicalHandler
- Throws:
SAXException
-