All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----org.jdom.output.SAXOutputter
SAXOutputter
takes a JDOM tree and fires SAX2 events.
ContentHandler
callbacks are supported. Both
ignorableWhitespace
and skippedEntity
have
not been implemented. The setDocumentLocator
callback has
been implemented, but the locator object always returns -1 for
getColumnNumber
and getLineNumber
.
The EntityResolver
callback resolveEntity
has
been implemented for DTDs.
At this time, it is not possible to access notations and unparsed entity
references in a DTD from a JDOM tree. Therefore, DTDHandler
callbacks have not been implemented yet.
The ErrorHandler
callbacks have not been implemented, since
these are supposed to be invoked when the document is parsed. However, the
document has already been parsed in order to create the JDOM tree.
This will create a SAXOutputter
with the
specified ContentHandler
.
This will create a SAXOutputter
with the
specified SAX2 handlers.
This will output the JDOM Document
, firing off the
SAX events that have been registered.
This will set the ContentHandler
.
This will set the DTDHandler
.
This will set the EntityResolver
.
This will set the ErrorHandler
.
This will define whether attribute namespace declarations shall be reported as "xmlns" attributes.
public SAXOutputter(ContentHandler contentHandler)
This will create a SAXOutputter
with the
specified ContentHandler
.
ContentHandler
callback methods
public SAXOutputter(ContentHandler contentHandler, ErrorHandler errorHandler, DTDHandler dtdHandler, EntityResolver entityResolver)
This will create a SAXOutputter
with the
specified SAX2 handlers. At this time, only ContentHandler
and EntityResolver
are supported.
ContentHandler
callback methods
ErrorHandler
callback methods
DTDHandler
callback methods
EntityResolver
callback methods
public void setContentHandler(ContentHandler contentHandler)
This will set the ContentHandler
.
ContentHandler
callback methods.
public void setErrorHandler(ErrorHandler errorHandler)
This will set the ErrorHandler
.
ErrorHandler
callback methods.
public void setDTDHandler(DTDHandler dtdHandler)
This will set the DTDHandler
.
DTDHandler
callback methods.
public void setEntityResolver(EntityResolver entityResolver)
This will set the EntityResolver
.
public void setReportNamespaceDeclarations(boolean declareNamespaces)
This will define whether attribute namespace declarations shall be
reported as "xmlns" attributes. This flag defaults to false
and behaves as the "namespace-prefixes" SAX core feature.
public void output(Document document) throws JDOMException
This will output the JDOM Document
, firing off the
SAX events that have been registered.
JDOM Document
to output.
All Packages Class Hierarchy This Package Previous Next Index