public interface XMLOutputProcessor
XMLOutputter.
People who want to create a custom XMLOutputProcessor for XMLOutputter are able to implement this interface with the following notes and restrictions:
process(Writer,Format,*) methods each
time the XMLOutputter is requested to output some JDOM content. It is thus
safe to assume that a process(Writer,Format,*) method can set up any
infrastructure needed to process the content, and that the XMLOutputter will
not re-call that method, or some other process(Writer,Format,*) method for the same output
sequence.
process(Writer,Format,*) method may (will) be called concurrently from different threads.
The AbstractXMLOutputProcessor class is a full implementation of this
interface and is fully customisable. People who want a custom XMLOutputter
are encouraged to extend the AbstractXMLOutputProcessor rather than do a full
re-implementation of this interface.
XMLOutputter,
AbstractXMLOutputProcessor| Modifier and Type | Method and Description |
|---|---|
void |
process(java.io.Writer out,
Format format,
CDATA cdata)
Print out a
node. |
void |
process(java.io.Writer out,
Format format,
Comment comment)
Print out a
. |
void |
process(java.io.Writer out,
Format format,
DocType doctype)
Print out the
. |
void |
process(java.io.Writer out,
Format format,
Document doc)
This will print the
to the given Writer. |
void |
process(java.io.Writer out,
Format format,
Element element)
|
void |
process(java.io.Writer out,
Format format,
EntityRef entity)
Print out a
. |
void |
process(java.io.Writer out,
Format format,
java.util.List<? extends Content> list)
This will handle printing out a list of nodes.
|
void |
process(java.io.Writer out,
Format format,
ProcessingInstruction pi)
Print out a
. |
void |
process(java.io.Writer out,
Format format,
Text text)
Print out a
node. |
void process(java.io.Writer out,
Format format,
Document doc)
throws java.io.IOException
Document to the given Writer.
Warning: using your own Writer 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.
out - Writer to use.format - Format instance specifying output styledoc - Document to format.java.io.IOException - if there's any problem writing.java.lang.NullPointerException - if the input content is nullvoid process(java.io.Writer out,
Format format,
DocType doctype)
throws java.io.IOException
DocType.out - Writer to use.format - Format instance specifying output styledoctype - DocType to output.java.io.IOException - if there's any problem writing.java.lang.NullPointerException - if the input content is nullvoid process(java.io.Writer out,
Format format,
Element element)
throws java.io.IOException
out - Writer to use.format - Format instance specifying output styleelement - Element to output.java.io.IOException - if there's any problem writing.java.lang.NullPointerException - if the input content is nullvoid process(java.io.Writer out,
Format format,
java.util.List<? extends Content> list)
throws java.io.IOException
out - Writer to use.format - Format instance specifying output stylelist - List of nodes.java.io.IOException - if there's any problem writing.java.lang.NullPointerException - if the input list is null or contains null membersjava.lang.ClassCastException - if any of the list members are not Contentvoid process(java.io.Writer out,
Format format,
CDATA cdata)
throws java.io.IOException
CDATA node.out - Writer to use.format - Format instance specifying output stylecdata - CDATA to output.java.io.IOException - if there's any problem writing.java.lang.NullPointerException - if the input content is nullvoid process(java.io.Writer out,
Format format,
Text text)
throws java.io.IOException
Text node. Performs the necessary entity
escaping and whitespace stripping.out - Writer to use.format - Format instance specifying output styletext - Text to output.java.io.IOException - if there's any problem writing.java.lang.NullPointerException - if the input content is nullvoid process(java.io.Writer out,
Format format,
Comment comment)
throws java.io.IOException
Comment.out - Writer to use.format - Format instance specifying output stylecomment - Comment to output.java.io.IOException - if there's any problem writing.java.lang.NullPointerException - if the input content is nullvoid process(java.io.Writer out,
Format format,
ProcessingInstruction pi)
throws java.io.IOException
ProcessingInstruction.out - Writer to use.format - Format instance specifying output stylepi - ProcessingInstruction to output.java.io.IOException - if there's any problem writing.java.lang.NullPointerException - if the input content is nullvoid process(java.io.Writer out,
Format format,
EntityRef entity)
throws java.io.IOException
EntityRef.out - Writer to use.format - Format instance specifying output styleentity - EntityRef to output.java.io.IOException - if there's any problem writing.java.lang.NullPointerException - if the input content is nullCopyright © 2021 Jason Hunter, Brett McLaughlin. All Rights Reserved.