Package | Description |
---|---|
org.jdom2.output |
Classes to output JDOM documents to various destinations.
|
org.jdom2.output.support |
Classes used to implement output functionality that are not part of the
actual Output API, but rather part of the implementation.
|
Modifier and Type | Method and Description |
---|---|
Format |
Format.clone() |
static Format |
Format.getCompactFormat()
Returns a new Format object that performs whitespace normalization, uses
the UTF-8 encoding, doesn't expand empty elements, includes the
declaration and encoding, and uses the default entity escape strategy.
|
Format |
XMLOutputter.getFormat()
Returns the current format in use by the XMLOutputter.
|
Format |
StAXEventOutputter.getFormat()
Returns the current format in use by the StAXStreamOutputter.
|
Format |
SAXOutputter.getFormat()
Get the current
Format being used for output |
Format |
DOMOutputter.getFormat()
Get the Format instance currently used by this DOMOutputter.
|
Format |
StAXStreamReader.getFormat()
Returns the current format in use by the XMLOutputter.
|
Format |
StAXStreamOutputter.getFormat()
Returns the current format in use by the StAXStreamOutputter.
|
static Format |
Format.getPrettyFormat()
Returns a new Format object that performs whitespace beautification with
2-space indents, uses the UTF-8 encoding, doesn't expand empty elements,
includes the declaration and encoding, and uses the default entity
escape strategy.
|
static Format |
Format.getRawFormat()
Returns a new Format object that performs no whitespace changes, uses
the UTF-8 encoding, doesn't expand empty elements, includes the
declaration and encoding, and uses the default entity escape strategy.
|
Format |
Format.setEncoding(java.lang.String encoding)
Sets the output encoding.
|
Format |
Format.setEscapeStrategy(EscapeStrategy strategy)
Sets the
EscapeStrategy to use for character escaping. |
Format |
Format.setExpandEmptyElements(boolean expandEmptyElements)
This will set whether empty elements are expanded from
<tagName/> to
<tagName></tagName> . |
Format |
Format.setIndent(java.lang.String indent)
This will set the indent
String to use; this
is usually a String of empty spaces. |
Format |
Format.setLineSeparator(LineSeparator separator)
This will set the newline separator sequence.
|
Format |
Format.setLineSeparator(java.lang.String separator)
This will set the newline separator (
LineSeparator ). |
Format |
Format.setOmitDeclaration(boolean omitDeclaration)
This will set whether the XML declaration
(
<?xml version="1.0"?> )
will be omitted or not. |
Format |
Format.setOmitEncoding(boolean omitEncoding)
This will set whether the XML declaration
(
<?xml version="1.0"
encoding="UTF-8"?> )
includes the encoding of the document. |
Format |
Format.setTextMode(Format.TextMode mode)
This sets the text output style.
|
Modifier and Type | Method and Description |
---|---|
void |
XMLOutputter.setFormat(Format newFormat)
Sets the new format logic for the XMLOutputter.
|
void |
StAXEventOutputter.setFormat(Format newFormat)
Sets the new format logic for the StAXStreamOutputter.
|
void |
SAXOutputter.setFormat(Format format)
Set the current
Format to be used for output. |
void |
DOMOutputter.setFormat(Format format)
Set a new Format instance for this DOMOutputter
|
void |
StAXStreamReader.setFormat(Format newFormat)
Sets the new format logic for the XMLOutputter.
|
void |
StAXStreamOutputter.setFormat(Format newFormat)
Sets the new format logic for the StAXStreamOutputter.
|
Constructor and Description |
---|
DOMOutputter(DOMAdapter adapter,
Format format,
DOMOutputProcessor processor)
The complete constructor for specifying a custom DOMAdaptor, Format, and
DOMOutputProcessor.
|
SAXOutputter(SAXOutputProcessor processor,
Format format,
org.xml.sax.ContentHandler contentHandler,
org.xml.sax.ErrorHandler errorHandler,
org.xml.sax.DTDHandler dtdHandler,
org.xml.sax.EntityResolver entityResolver,
org.xml.sax.ext.LexicalHandler lexicalHandler)
This will create a
SAXOutputter with the specified SAX2
handlers. |
StAXEventOutputter(Format format)
This will create an
StAXStreamOutputter with the specified format
characteristics. |
StAXEventOutputter(Format format,
StAXEventProcessor processor,
javax.xml.stream.XMLEventFactory eventfactory)
This will create an
StAXStreamOutputter with the specified format
characteristics. |
StAXStreamOutputter(Format format)
This will create an
StAXStreamOutputter with the specified format
characteristics. |
StAXStreamOutputter(Format format,
StAXStreamProcessor processor)
This will create an
StAXStreamOutputter with the specified format
characteristics. |
StAXStreamReader(Format format)
This will create an
XMLOutputter with the specified format
characteristics. |
StAXStreamReader(Format format,
StAXStreamReaderProcessor processor)
This will create an
XMLOutputter with the specified format
characteristics. |
XMLOutputter(Format format)
This will create an
XMLOutputter with the specified format
characteristics. |
XMLOutputter(Format format,
XMLOutputProcessor processor)
This will create an
XMLOutputter with the specified format
characteristics. |
Modifier and Type | Method and Description |
---|---|
javax.xml.stream.XMLStreamReader |
AbstractStAXStreamReaderProcessor.buildReader(Document doc,
Format format) |
javax.xml.stream.XMLStreamReader |
StAXStreamReaderProcessor.buildReader(Document doc,
Format format)
Return an implementation of an XMLStreamReader that represents
a JDOM Document.
|
org.w3c.dom.Attr |
DOMOutputProcessor.process(org.w3c.dom.Document basedoc,
Format format,
Attribute attribute)
This will convert the
using the given DOM
Document to create the resulting DOM Attr. |
org.w3c.dom.Attr |
AbstractDOMOutputProcessor.process(org.w3c.dom.Document basedoc,
Format format,
Attribute attribute) |
org.w3c.dom.CDATASection |
DOMOutputProcessor.process(org.w3c.dom.Document basedoc,
Format format,
CDATA cdata)
This will convert the
using the given DOM
Document to create the resulting DOM CDATASection. |
org.w3c.dom.CDATASection |
AbstractDOMOutputProcessor.process(org.w3c.dom.Document basedoc,
Format format,
CDATA cdata) |
org.w3c.dom.Comment |
DOMOutputProcessor.process(org.w3c.dom.Document basedoc,
Format format,
Comment comment)
This will convert the
using the given DOM
Document to create the resulting DOM Comment. |
org.w3c.dom.Comment |
AbstractDOMOutputProcessor.process(org.w3c.dom.Document basedoc,
Format format,
Comment comment) |
org.w3c.dom.Document |
DOMOutputProcessor.process(org.w3c.dom.Document basedoc,
Format format,
Document doc)
This will convert the
to the given DOM
Document. |
org.w3c.dom.Document |
AbstractDOMOutputProcessor.process(org.w3c.dom.Document basedoc,
Format format,
Document doc) |
org.w3c.dom.Element |
DOMOutputProcessor.process(org.w3c.dom.Document basedoc,
Format format,
Element element)
This will convert the
using the given DOM
Document to create the resulting DOM Element. |
org.w3c.dom.Element |
AbstractDOMOutputProcessor.process(org.w3c.dom.Document basedoc,
Format format,
Element element) |
org.w3c.dom.EntityReference |
DOMOutputProcessor.process(org.w3c.dom.Document basedoc,
Format format,
EntityRef entity)
This will convert the
using the given DOM
Document to create the resulting DOM EntityReference. |
org.w3c.dom.EntityReference |
AbstractDOMOutputProcessor.process(org.w3c.dom.Document basedoc,
Format format,
EntityRef entity) |
java.util.List<org.w3c.dom.Node> |
DOMOutputProcessor.process(org.w3c.dom.Document basedoc,
Format format,
java.util.List<? extends Content> list)
This will convert the list of JDOM
using the
given DOM Document to create the resulting list of DOM Nodes. |
java.util.List<org.w3c.dom.Node> |
AbstractDOMOutputProcessor.process(org.w3c.dom.Document basedoc,
Format format,
java.util.List<? extends Content> list) |
org.w3c.dom.ProcessingInstruction |
DOMOutputProcessor.process(org.w3c.dom.Document basedoc,
Format format,
ProcessingInstruction pi)
This will convert the
using
the given DOM Document to create the resulting DOM ProcessingInstruction. |
org.w3c.dom.ProcessingInstruction |
AbstractDOMOutputProcessor.process(org.w3c.dom.Document basedoc,
Format format,
ProcessingInstruction pi) |
org.w3c.dom.Text |
DOMOutputProcessor.process(org.w3c.dom.Document basedoc,
Format format,
Text text)
This will convert the
using the given DOM
Document to create the resulting DOM Text. |
org.w3c.dom.Text |
AbstractDOMOutputProcessor.process(org.w3c.dom.Document basedoc,
Format format,
Text text) |
void |
SAXOutputProcessor.process(SAXTarget out,
Format format,
CDATA cdata)
Print out a
node. |
void |
AbstractSAXOutputProcessor.process(SAXTarget out,
Format format,
CDATA cdata) |
void |
SAXOutputProcessor.process(SAXTarget out,
Format format,
Comment comment)
Print out a
. |
void |
AbstractSAXOutputProcessor.process(SAXTarget out,
Format format,
Comment comment) |
void |
SAXOutputProcessor.process(SAXTarget out,
Format format,
DocType doctype)
Print out the
. |
void |
AbstractSAXOutputProcessor.process(SAXTarget out,
Format format,
DocType doctype) |
void |
SAXOutputProcessor.process(SAXTarget out,
Format format,
Document doc)
This will print the
to the given SAXTarget. |
void |
AbstractSAXOutputProcessor.process(SAXTarget out,
Format format,
Document doc) |
void |
SAXOutputProcessor.process(SAXTarget out,
Format format,
Element element)
|
void |
AbstractSAXOutputProcessor.process(SAXTarget out,
Format format,
Element element) |
void |
SAXOutputProcessor.process(SAXTarget out,
Format format,
EntityRef entity)
Print out a
. |
void |
AbstractSAXOutputProcessor.process(SAXTarget out,
Format format,
EntityRef entity) |
void |
SAXOutputProcessor.process(SAXTarget out,
Format format,
java.util.List<? extends Content> list)
This will handle printing out a list of nodes.
|
void |
AbstractSAXOutputProcessor.process(SAXTarget out,
Format format,
java.util.List<? extends Content> list) |
void |
SAXOutputProcessor.process(SAXTarget out,
Format format,
ProcessingInstruction pi)
Print out a
. |
void |
AbstractSAXOutputProcessor.process(SAXTarget out,
Format format,
ProcessingInstruction pi) |
void |
SAXOutputProcessor.process(SAXTarget out,
Format format,
Text text)
Print out a
node. |
void |
AbstractSAXOutputProcessor.process(SAXTarget out,
Format format,
Text text) |
void |
XMLOutputProcessor.process(java.io.Writer out,
Format format,
CDATA cdata)
Print out a
node. |
void |
AbstractXMLOutputProcessor.process(java.io.Writer out,
Format format,
CDATA cdata) |
void |
XMLOutputProcessor.process(java.io.Writer out,
Format format,
Comment comment)
Print out a
. |
void |
AbstractXMLOutputProcessor.process(java.io.Writer out,
Format format,
Comment comment) |
void |
XMLOutputProcessor.process(java.io.Writer out,
Format format,
DocType doctype)
Print out the
. |
void |
AbstractXMLOutputProcessor.process(java.io.Writer out,
Format format,
DocType doctype) |
void |
XMLOutputProcessor.process(java.io.Writer out,
Format format,
Document doc)
This will print the
to the given Writer. |
void |
AbstractXMLOutputProcessor.process(java.io.Writer out,
Format format,
Document doc) |
void |
XMLOutputProcessor.process(java.io.Writer out,
Format format,
Element element)
|
void |
AbstractXMLOutputProcessor.process(java.io.Writer out,
Format format,
Element element) |
void |
XMLOutputProcessor.process(java.io.Writer out,
Format format,
EntityRef entity)
Print out a
. |
void |
AbstractXMLOutputProcessor.process(java.io.Writer out,
Format format,
EntityRef entity) |
void |
XMLOutputProcessor.process(java.io.Writer out,
Format format,
java.util.List<? extends Content> list)
This will handle printing out a list of nodes.
|
void |
AbstractXMLOutputProcessor.process(java.io.Writer out,
Format format,
java.util.List<? extends Content> list) |
void |
XMLOutputProcessor.process(java.io.Writer out,
Format format,
ProcessingInstruction pi)
Print out a
. |
void |
AbstractXMLOutputProcessor.process(java.io.Writer out,
Format format,
ProcessingInstruction pi) |
void |
XMLOutputProcessor.process(java.io.Writer out,
Format format,
Text text)
Print out a
node. |
void |
AbstractXMLOutputProcessor.process(java.io.Writer out,
Format format,
Text text) |
void |
AbstractStAXEventProcessor.process(javax.xml.stream.util.XMLEventConsumer out,
Format format,
javax.xml.stream.XMLEventFactory eventfactory,
CDATA cdata) |
void |
StAXEventProcessor.process(javax.xml.stream.util.XMLEventConsumer out,
Format format,
javax.xml.stream.XMLEventFactory eventfactpry,
CDATA cdata)
Print out a
node. |
void |
AbstractStAXEventProcessor.process(javax.xml.stream.util.XMLEventConsumer out,
Format format,
javax.xml.stream.XMLEventFactory eventfactory,
Comment comment) |
void |
StAXEventProcessor.process(javax.xml.stream.util.XMLEventConsumer out,
Format format,
javax.xml.stream.XMLEventFactory eventfactory,
Comment comment)
Print out a
. |
void |
AbstractStAXEventProcessor.process(javax.xml.stream.util.XMLEventConsumer out,
Format format,
javax.xml.stream.XMLEventFactory eventfactory,
DocType doctype) |
void |
StAXEventProcessor.process(javax.xml.stream.util.XMLEventConsumer out,
Format format,
javax.xml.stream.XMLEventFactory eventfactory,
DocType doctype)
Print out the
. |
void |
AbstractStAXEventProcessor.process(javax.xml.stream.util.XMLEventConsumer out,
Format format,
javax.xml.stream.XMLEventFactory eventfactory,
Document doc) |
void |
StAXEventProcessor.process(javax.xml.stream.util.XMLEventConsumer out,
Format format,
javax.xml.stream.XMLEventFactory eventfactory,
Document doc)
This will print the
to the given XMLEventConsumer. |
void |
AbstractStAXEventProcessor.process(javax.xml.stream.util.XMLEventConsumer out,
Format format,
javax.xml.stream.XMLEventFactory eventfactory,
Element element) |
void |
StAXEventProcessor.process(javax.xml.stream.util.XMLEventConsumer out,
Format format,
javax.xml.stream.XMLEventFactory eventfactory,
Element element)
|
void |
AbstractStAXEventProcessor.process(javax.xml.stream.util.XMLEventConsumer out,
Format format,
javax.xml.stream.XMLEventFactory eventfactory,
EntityRef entity) |
void |
StAXEventProcessor.process(javax.xml.stream.util.XMLEventConsumer out,
Format format,
javax.xml.stream.XMLEventFactory eventfactory,
EntityRef entity)
Print out a
. |
void |
AbstractStAXEventProcessor.process(javax.xml.stream.util.XMLEventConsumer out,
Format format,
javax.xml.stream.XMLEventFactory eventfactory,
java.util.List<? extends Content> list) |
void |
StAXEventProcessor.process(javax.xml.stream.util.XMLEventConsumer out,
Format format,
javax.xml.stream.XMLEventFactory eventfactory,
java.util.List<? extends Content> list)
This will handle printing out a list of nodes.
|
void |
AbstractStAXEventProcessor.process(javax.xml.stream.util.XMLEventConsumer out,
Format format,
javax.xml.stream.XMLEventFactory eventfactory,
ProcessingInstruction pi) |
void |
StAXEventProcessor.process(javax.xml.stream.util.XMLEventConsumer out,
Format format,
javax.xml.stream.XMLEventFactory eventfactory,
ProcessingInstruction pi)
Print out a
. |
void |
AbstractStAXEventProcessor.process(javax.xml.stream.util.XMLEventConsumer out,
Format format,
javax.xml.stream.XMLEventFactory eventfactory,
Text text) |
void |
StAXEventProcessor.process(javax.xml.stream.util.XMLEventConsumer out,
Format format,
javax.xml.stream.XMLEventFactory eventfactory,
Text text)
Print out a
node. |
void |
StAXStreamProcessor.process(javax.xml.stream.XMLStreamWriter out,
Format format,
CDATA cdata)
Print out a
node. |
void |
AbstractStAXStreamProcessor.process(javax.xml.stream.XMLStreamWriter out,
Format format,
CDATA cdata) |
void |
StAXStreamProcessor.process(javax.xml.stream.XMLStreamWriter out,
Format format,
Comment comment)
Print out a
. |
void |
AbstractStAXStreamProcessor.process(javax.xml.stream.XMLStreamWriter out,
Format format,
Comment comment) |
void |
StAXStreamProcessor.process(javax.xml.stream.XMLStreamWriter out,
Format format,
DocType doctype)
Print out the
. |
void |
AbstractStAXStreamProcessor.process(javax.xml.stream.XMLStreamWriter out,
Format format,
DocType doctype) |
void |
StAXStreamProcessor.process(javax.xml.stream.XMLStreamWriter out,
Format format,
Document doc)
This will print the
to the given XMLStreamWriter. |
void |
AbstractStAXStreamProcessor.process(javax.xml.stream.XMLStreamWriter out,
Format format,
Document doc) |
void |
StAXStreamProcessor.process(javax.xml.stream.XMLStreamWriter out,
Format format,
Element element)
|
void |
AbstractStAXStreamProcessor.process(javax.xml.stream.XMLStreamWriter out,
Format format,
Element element) |
void |
StAXStreamProcessor.process(javax.xml.stream.XMLStreamWriter out,
Format format,
EntityRef entity)
Print out a
. |
void |
AbstractStAXStreamProcessor.process(javax.xml.stream.XMLStreamWriter out,
Format format,
EntityRef entity) |
void |
StAXStreamProcessor.process(javax.xml.stream.XMLStreamWriter out,
Format format,
java.util.List<? extends Content> list)
This will handle printing out a list of nodes.
|
void |
AbstractStAXStreamProcessor.process(javax.xml.stream.XMLStreamWriter out,
Format format,
java.util.List<? extends Content> list) |
void |
StAXStreamProcessor.process(javax.xml.stream.XMLStreamWriter out,
Format format,
ProcessingInstruction pi)
Print out a
. |
void |
AbstractStAXStreamProcessor.process(javax.xml.stream.XMLStreamWriter out,
Format format,
ProcessingInstruction pi) |
void |
StAXStreamProcessor.process(javax.xml.stream.XMLStreamWriter out,
Format format,
Text text)
Print out a
node. |
void |
AbstractStAXStreamProcessor.process(javax.xml.stream.XMLStreamWriter out,
Format format,
Text text) |
void |
SAXOutputProcessor.processAsDocument(SAXTarget out,
Format format,
Element element)
|
void |
AbstractSAXOutputProcessor.processAsDocument(SAXTarget out,
Format format,
Element node) |
void |
SAXOutputProcessor.processAsDocument(SAXTarget out,
Format format,
java.util.List<? extends Content> list)
This will handle printing out a list of nodes that is encapsulated in
start/end Document SAX events.
|
void |
AbstractSAXOutputProcessor.processAsDocument(SAXTarget out,
Format format,
java.util.List<? extends Content> nodes) |
Constructor and Description |
---|
AbstractStAXStreamReader(Document document,
Format format)
Create a new AbstractStAXStreamReader that outputs a JDOM Document as an XMLStream.
|
FormatStack(Format format)
Creates a new FormatStack seeded with the specified Format
|
Copyright © 2021 Jason Hunter, Brett McLaughlin. All Rights Reserved.