public interface StAXStreamProcessor
StAXStreamOutputter
.
People who want to create a custom StAXStreamProcessor for StAXStreamOutputter are able to implement this interface.
The AbstractStAXStreamProcessor
class is a full implementation of this
interface and is fully customisable. People who want a custom StAXStreamOutputter
are encouraged to extend the AbstractStAXStreamProcessor rather than do a full
re-implementation of this interface.
StAXStreamOutputter
,
AbstractStAXStreamProcessor
Modifier and Type | Method and Description |
---|---|
void |
process(javax.xml.stream.XMLStreamWriter out,
Format format,
CDATA cdata)
Print out a
node. |
void |
process(javax.xml.stream.XMLStreamWriter out,
Format format,
Comment comment)
Print out a
. |
void |
process(javax.xml.stream.XMLStreamWriter out,
Format format,
DocType doctype)
Print out the
. |
void |
process(javax.xml.stream.XMLStreamWriter out,
Format format,
Document doc)
This will print the
to the given XMLStreamWriter. |
void |
process(javax.xml.stream.XMLStreamWriter out,
Format format,
Element element)
|
void |
process(javax.xml.stream.XMLStreamWriter out,
Format format,
EntityRef entity)
Print out a
. |
void |
process(javax.xml.stream.XMLStreamWriter out,
Format format,
java.util.List<? extends Content> list)
This will handle printing out a list of nodes.
|
void |
process(javax.xml.stream.XMLStreamWriter out,
Format format,
ProcessingInstruction pi)
Print out a
. |
void |
process(javax.xml.stream.XMLStreamWriter out,
Format format,
Text text)
Print out a
node. |
void process(javax.xml.stream.XMLStreamWriter out, Format format, Document doc) throws javax.xml.stream.XMLStreamException
Document
to the given XMLStreamWriter.
Warning: using your own XMLStreamWriter 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
- XMLStreamWriter
to use.format
- Format
instance specifying output styledoc
- Document
to format.javax.xml.stream.XMLStreamException
- if there's any problem writing.java.lang.NullPointerException
- if the input content is nullvoid process(javax.xml.stream.XMLStreamWriter out, Format format, DocType doctype) throws javax.xml.stream.XMLStreamException
DocType
.out
- XMLStreamWriter
to use.format
- Format
instance specifying output styledoctype
- DocType
to output.javax.xml.stream.XMLStreamException
- if there's any problem writing.java.lang.NullPointerException
- if the input content is nullvoid process(javax.xml.stream.XMLStreamWriter out, Format format, Element element) throws javax.xml.stream.XMLStreamException
out
- XMLStreamWriter
to use.format
- Format
instance specifying output styleelement
- Element
to output.javax.xml.stream.XMLStreamException
- if there's any problem writing.java.lang.NullPointerException
- if the input content is nullvoid process(javax.xml.stream.XMLStreamWriter out, Format format, java.util.List<? extends Content> list) throws javax.xml.stream.XMLStreamException
out
- XMLStreamWriter
to use.format
- Format
instance specifying output stylelist
- List
of nodes.javax.xml.stream.XMLStreamException
- 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 Content
void process(javax.xml.stream.XMLStreamWriter out, Format format, CDATA cdata) throws javax.xml.stream.XMLStreamException
CDATA
node.out
- XMLStreamWriter
to use.format
- Format
instance specifying output stylecdata
- CDATA
to output.javax.xml.stream.XMLStreamException
- if there's any problem writing.java.lang.NullPointerException
- if the input content is nullvoid process(javax.xml.stream.XMLStreamWriter out, Format format, Text text) throws javax.xml.stream.XMLStreamException
Text
node. Performs the necessary entity
escaping and whitespace stripping.out
- XMLStreamWriter
to use.format
- Format
instance specifying output styletext
- Text
to output.javax.xml.stream.XMLStreamException
- if there's any problem writing.java.lang.NullPointerException
- if the input content is nullvoid process(javax.xml.stream.XMLStreamWriter out, Format format, Comment comment) throws javax.xml.stream.XMLStreamException
Comment
.out
- XMLStreamWriter
to use.format
- Format
instance specifying output stylecomment
- Comment
to output.javax.xml.stream.XMLStreamException
- if there's any problem writing.java.lang.NullPointerException
- if the input content is nullvoid process(javax.xml.stream.XMLStreamWriter out, Format format, ProcessingInstruction pi) throws javax.xml.stream.XMLStreamException
ProcessingInstruction
.out
- XMLStreamWriter
to use.format
- Format
instance specifying output stylepi
- ProcessingInstruction
to output.javax.xml.stream.XMLStreamException
- if there's any problem writing.java.lang.NullPointerException
- if the input content is nullvoid process(javax.xml.stream.XMLStreamWriter out, Format format, EntityRef entity) throws javax.xml.stream.XMLStreamException
EntityRef
.out
- XMLStreamWriter
to use.format
- Format
instance specifying output styleentity
- EntityRef
to output.javax.xml.stream.XMLStreamException
- if there's any problem writing.java.lang.NullPointerException
- if the input content is nullCopyright © 2021 Jason Hunter, Brett McLaughlin. All Rights Reserved.