com.jclark.xsl.sax2

Class XMLOutputHandler

public class XMLOutputHandler extends Object implements OutputContentHandler, CommentHandler, RawCharactersHandler

A ContentHandler that writes an XML representation to an OutputStream.
Field Summary
static byteMINIMIZE_EMPTY_ELEMENTS
static byteMINIMIZE_EMPTY_ELEMENTS_HTML
static byteMINIMIZE_NONE
Constructor Summary
XMLOutputHandler()
Create a XMLOutputHandler that will write in UTF-8 to an OutputStream.
XMLOutputHandler(OutputStream out)
Method Summary
protected voidattributeValue(String value)
voidcharacters(char[] cbuf, int off, int len)
voidcomment(String body)
voidendDocument()
voidendElement(String namespace, String localName, String qName)
voidendPrefixMapping(String prefix)
voidignorableWhitespace(char[] ch, int start, int length)
ContentHandlerinit(Destination dest, Properties props)
return this intialized for writing to the output represented by dest with the output parameters found in props.
voidmarkup(String chars)
voidprocessingInstruction(String target, String data)
voidrawCharacters(String chars)
voidsetDocumentLocator(Locator loc)
voidsetMinimize(byte minimize)
voidskippedEntity(String name)
voidstartDocument()
voidstartElement(String namespace, String localName, String qName, Attributes atts)
voidstartPrefixMapping(String prefix, String namespaceURI)

Field Detail

MINIMIZE_EMPTY_ELEMENTS

public static final byte MINIMIZE_EMPTY_ELEMENTS

MINIMIZE_EMPTY_ELEMENTS_HTML

public static final byte MINIMIZE_EMPTY_ELEMENTS_HTML

MINIMIZE_NONE

public static final byte MINIMIZE_NONE

Constructor Detail

XMLOutputHandler

public XMLOutputHandler()
Create a XMLOutputHandler that will write in UTF-8 to an OutputStream.

XMLOutputHandler

public XMLOutputHandler(OutputStream out)

Method Detail

attributeValue

protected void attributeValue(String value)

characters

public void characters(char[] cbuf, int off, int len)

comment

public void comment(String body)

endDocument

public void endDocument()

endElement

public void endElement(String namespace, String localName, String qName)

endPrefixMapping

public void endPrefixMapping(String prefix)

ignorableWhitespace

public void ignorableWhitespace(char[] ch, int start, int length)

init

public ContentHandler init(Destination dest, Properties props)
return this intialized for writing to the output represented by dest with the output parameters found in props.

markup

public void markup(String chars)

processingInstruction

public void processingInstruction(String target, String data)

rawCharacters

public void rawCharacters(String chars)

setDocumentLocator

public void setDocumentLocator(Locator loc)

setMinimize

public void setMinimize(byte minimize)

skippedEntity

public void skippedEntity(String name)

startDocument

public void startDocument()

startElement

public void startElement(String namespace, String localName, String qName, Attributes atts)

startPrefixMapping

public void startPrefixMapping(String prefix, String namespaceURI)