|
JDOM 2.0.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdom2.output.support.AbstractOutputProcessor
org.jdom2.output.support.AbstractSAXOutputProcessor
public class AbstractSAXOutputProcessor
Outputs a JDOM document as a stream of SAX2 events.
Most ContentHandler callbacks are supported. Neither
ignorableWhitespace() nor skippedEntity() have been
implemented.
At this time, it is not possible to access notations and unparsed entity
references in a DTD from JDOM. Therefore, full DTDHandler
call-backs have not been implemented yet.
The ErrorHandler call-backs have not been implemented, since
these are supposed to be invoked when the document is parsed and at this
point the document exists in memory and is known to have no errors.
| Constructor Summary | |
|---|---|
AbstractSAXOutputProcessor()
|
|
| Method Summary | |
|---|---|
protected org.xml.sax.XMLReader |
createParser()
Creates a SAX XMLReader. |
protected void |
printCDATA(SAXTarget out,
FormatStack fstack,
CDATA cdata)
This will handle printing of a CDATA. |
protected void |
printComment(SAXTarget out,
FormatStack fstack,
Comment comment)
This will handle printing of a Comment. |
protected void |
printContent(SAXTarget out,
FormatStack fstack,
NamespaceStack nstack,
Walker walker)
This will handle printing of a List of Content. |
protected void |
printDocType(SAXTarget out,
FormatStack fstack,
DocType docType)
This will handle printing of a DocType. |
protected void |
printDocument(SAXTarget out,
FormatStack fstack,
NamespaceStack nstack,
Document document)
This will handle printing of a Document. |
protected void |
printElement(SAXTarget out,
FormatStack fstack,
NamespaceStack nstack,
Element element)
This will handle printing of an Element. |
protected void |
printEntityRef(SAXTarget out,
FormatStack fstack,
EntityRef entity)
This will handle printing of an EntityRef. |
protected void |
printProcessingInstruction(SAXTarget out,
FormatStack fstack,
ProcessingInstruction pi)
This will handle printing of a ProcessingInstruction. |
protected void |
printText(SAXTarget out,
FormatStack fstack,
Text text)
This will handle printing of a Text. |
void |
process(SAXTarget out,
Format format,
CDATA cdata)
Print out a node. |
void |
process(SAXTarget out,
Format format,
Comment comment)
Print out a . |
void |
process(SAXTarget out,
Format format,
DocType doctype)
Print out the . |
void |
process(SAXTarget out,
Format format,
Document doc)
This will print the to the given SAXTarget. |
void |
process(SAXTarget out,
Format format,
Element element)
Print out an , including its
s, and all contained (child) elements, etc. |
void |
process(SAXTarget out,
Format format,
EntityRef entity)
Print out a . |
void |
process(SAXTarget out,
Format format,
java.util.List<? extends Content> list)
This will handle printing out a list of nodes. |
void |
process(SAXTarget out,
Format format,
ProcessingInstruction pi)
Print out a . |
void |
process(SAXTarget out,
Format format,
Text text)
Print out a node. |
void |
processAsDocument(SAXTarget out,
Format format,
Element node)
Print out an encapsulated in start/end
Document SAX events, including its s, and
all contained (child) elements, etc. |
void |
processAsDocument(SAXTarget out,
Format format,
java.util.List<? extends Content> nodes)
This will handle printing out a list of nodes thats encapsulated in start/end Document SAX events. |
| Methods inherited from class org.jdom2.output.support.AbstractOutputProcessor |
|---|
buildWalker |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractSAXOutputProcessor()
| Method Detail |
|---|
public void process(SAXTarget out,
Format format,
Document doc)
throws JDOMException
SAXOutputProcessorDocument to the given SAXTarget.
Warning: using your own SAXTarget may cause the outputter's preferred character encoding to be ignored. If you use encodings other than UTF-8, we recommend using the method that takes an OutputStream instead.
process in interface SAXOutputProcessorout - SAXTarget to use.format - Format instance specifying output styledoc - Document to format.
JDOMException - if there is an issue encountered during output.
public void process(SAXTarget out,
Format format,
DocType doctype)
throws JDOMException
SAXOutputProcessorDocType.
process in interface SAXOutputProcessorout - SAXTarget to use.format - Format instance specifying output styledoctype - DocType to output.
JDOMException - if there is an issue encountered during output.
public void process(SAXTarget out,
Format format,
Element element)
throws JDOMException
SAXOutputProcessorElement, including its
Attributes, and all contained (child) elements, etc.
process in interface SAXOutputProcessorout - SAXTarget to use.format - Format instance specifying output styleelement - Element to output.
JDOMException - if there is an issue encountered during output.
public void process(SAXTarget out,
Format format,
java.util.List<? extends Content> list)
throws JDOMException
SAXOutputProcessor
process in interface SAXOutputProcessorout - SAXTarget to use.format - Format instance specifying output stylelist - List of nodes.
JDOMException - if there is an issue encountered during output.
public void process(SAXTarget out,
Format format,
CDATA cdata)
throws JDOMException
SAXOutputProcessorCDATA node.
process in interface SAXOutputProcessorout - SAXTarget to use.format - Format instance specifying output stylecdata - CDATA to output.
JDOMException - if there is an issue encountered during output.
public void process(SAXTarget out,
Format format,
Text text)
throws JDOMException
SAXOutputProcessorText node. Perfoms the necessary entity
escaping and whitespace stripping.
process in interface SAXOutputProcessorout - SAXTarget to use.format - Format instance specifying output styletext - Text to output.
JDOMException - if there is an issue encountered during output.
public void process(SAXTarget out,
Format format,
Comment comment)
throws JDOMException
SAXOutputProcessorComment.
process in interface SAXOutputProcessorout - SAXTarget to use.format - Format instance specifying output stylecomment - Comment to output.
JDOMException - if there is an issue encountered during output.
public void process(SAXTarget out,
Format format,
ProcessingInstruction pi)
throws JDOMException
SAXOutputProcessorProcessingInstruction.
process in interface SAXOutputProcessorout - SAXTarget to use.format - Format instance specifying output stylepi - ProcessingInstruction to output.
JDOMException - if there is an issue encountered during output.
public void process(SAXTarget out,
Format format,
EntityRef entity)
throws JDOMException
SAXOutputProcessorEntityRef.
process in interface SAXOutputProcessorout - SAXTarget to use.format - Format instance specifying output styleentity - EntityRef to output.
JDOMException - if there is an issue encountered during output.
public void processAsDocument(SAXTarget out,
Format format,
java.util.List<? extends Content> nodes)
throws JDOMException
SAXOutputProcessor
processAsDocument in interface SAXOutputProcessorout - SAXTarget to use.format - Format instance specifying output stylenodes - List of nodes.
JDOMException - if there is an issue encountered during output.
public void processAsDocument(SAXTarget out,
Format format,
Element node)
throws JDOMException
SAXOutputProcessorElement encapsulated in start/end
Document SAX events, including its Attributes, and
all contained (child) elements, etc.
processAsDocument in interface SAXOutputProcessorout - SAXTarget to use.format - Format instance specifying output stylenode - Element to output.
JDOMException - if there is an issue encountered during output.
protected void printDocument(SAXTarget out,
FormatStack fstack,
NamespaceStack nstack,
Document document)
throws org.xml.sax.SAXException
Document.
out - SAXTarget to use.fstack - the FormatStacknstack - the NamespaceStackdocument - Document to write.
org.xml.sax.SAXException - if the destination SAXTarget fails
protected void printDocType(SAXTarget out,
FormatStack fstack,
DocType docType)
throws org.xml.sax.SAXException
DocType.
out - SAXTarget to use.fstack - the FormatStackdocType - DocType to write.
org.xml.sax.SAXException - if the destination SAXTarget fails
protected void printProcessingInstruction(SAXTarget out,
FormatStack fstack,
ProcessingInstruction pi)
throws org.xml.sax.SAXException
ProcessingInstruction.
out - SAXTarget to use.fstack - the FormatStackpi - ProcessingInstruction to write.
org.xml.sax.SAXException - if the destination SAXTarget fails
protected void printComment(SAXTarget out,
FormatStack fstack,
Comment comment)
throws org.xml.sax.SAXException
Comment.
out - SAXTarget to use.fstack - the FormatStackcomment - Comment to write.
org.xml.sax.SAXException - if the destination SAXTarget fails
protected void printEntityRef(SAXTarget out,
FormatStack fstack,
EntityRef entity)
throws org.xml.sax.SAXException
EntityRef.
out - SAXTarget to use.fstack - the FormatStackentity - EntotyRef to write.
org.xml.sax.SAXException - if the destination SAXTarget fails
protected void printCDATA(SAXTarget out,
FormatStack fstack,
CDATA cdata)
throws org.xml.sax.SAXException
CDATA.
out - SAXTarget to use.fstack - the FormatStackcdata - CDATA to write.
org.xml.sax.SAXException - if the destination SAXTarget fails
protected void printText(SAXTarget out,
FormatStack fstack,
Text text)
throws org.xml.sax.SAXException
Text.
out - SAXTarget to use.fstack - the FormatStacktext - Text to write.
org.xml.sax.SAXException - if the destination SAXTarget fails
protected void printElement(SAXTarget out,
FormatStack fstack,
NamespaceStack nstack,
Element element)
throws org.xml.sax.SAXException
Element.
This method arranges for outputting the Element infrastructure including Namespace Declarations and Attributes.
out - SAXTarget to use.fstack - the FormatStacknstack - the NamespaceStackelement - Element to write.
org.xml.sax.SAXException - if the destination SAXTarget fails
protected void printContent(SAXTarget out,
FormatStack fstack,
NamespaceStack nstack,
Walker walker)
throws org.xml.sax.SAXException
Content.
It relies on the appropriate Walker to get the formatting right.
out - SAXTarget to use.fstack - the FormatStacknstack - the NamespaceStackwalker - Waker of Content to write.
org.xml.sax.SAXException - if the destination SAXTarget fails
protected org.xml.sax.XMLReader createParser()
throws java.lang.Exception
Creates a SAX XMLReader.
XMLReader a SAX2 parser.
java.lang.Exception - if no parser can be created.
|
JDOM 2.0.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||