|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
Constructor Summary | |
SAXOutputter(ContentHandler contentHandler)
This will create a SAXOutputter with the
specified ContentHandler . |
|
SAXOutputter(ContentHandler contentHandler,
ErrorHandler errorHandler,
DTDHandler dtdHandler,
EntityResolver entityResolver)
This will create a SAXOutputter with the
specified SAX2 handlers. |
Method Summary | |
void |
output(Document document)
This will output the JDOM Document , firing off the
SAX events that have been registered. |
void |
setContentHandler(ContentHandler contentHandler)
This will set the ContentHandler . |
void |
setDTDHandler(DTDHandler dtdHandler)
This will set the DTDHandler . |
void |
setEntityResolver(EntityResolver entityResolver)
This will set the EntityResolver . |
void |
setErrorHandler(ErrorHandler errorHandler)
This will set the ErrorHandler . |
void |
setReportNamespaceDeclarations(boolean declareNamespaces)
This will define whether attribute namespace declarations shall be reported as "xmlns" attributes. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public SAXOutputter(ContentHandler contentHandler)
This will create a SAXOutputter
with the
specified ContentHandler
.
contentHandler
- contains ContentHandler
callback methodspublic 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
- contains ContentHandler
callback methodserrorHandler
- contains ErrorHandler
callback methodsdtdHandler
- contains DTDHandler
callback methodsentityResolver
- contains EntityResolver
callback methodsMethod Detail |
public void setContentHandler(ContentHandler contentHandler)
This will set the ContentHandler
.
contentHandler
- contains ContentHandler
callback methods.public void setErrorHandler(ErrorHandler errorHandler)
This will set the ErrorHandler
.
errorHandler
- contains ErrorHandler
callback methods.public void setDTDHandler(DTDHandler dtdHandler)
This will set the DTDHandler
.
dtdHandler
- contains DTDHandler
callback methods.public void setEntityResolver(EntityResolver entityResolver)
This will set the EntityResolver
.
entityResolver
- contains EntityResolver callback methods.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.
reportDecl
- whether attribute namespace declarations shall be
reported as "xmlns" attributes.public void output(Document document) throws JDOMException
This will output the JDOM Document
, firing off the
SAX events that have been registered.
document
- JDOM Document
to output.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |