public abstract class AbstractDOMOutputProcessor extends AbstractOutputProcessor implements DOMOutputProcessor
DOMOutputProcessor
for supporting the DOMOutputter.
process*(...) methods are public because they match the
DOMOutputProcessor interface but the remaining methods are all protected.
People who want to create a custom DOMOutputProcessor for DOMOutputter
are able to extend this class and modify any functionality they want. Before
sub-classing this you should first check to see if the Format class
can get you the results you want.
Subclasses of this should have reentrant methods. This is
easiest to accomplish simply by not allowing any instance fields. If your
sub-class has an instance field/variable, then it's probably broken.
NamespaceStack and FormatStack that are
managed in the
printElement(FormatStack, NamespaceStack, org.w3c.dom.Document, Element)
method. The stacks are pushed and popped in that method only. They
significantly improve the performance and readability of the code.
The NamespaceStack is only sent through to the
printElement(FormatStack, NamespaceStack, org.w3c.dom.Document, Element)
and
printContent(FormatStack, NamespaceStack, org.w3c.dom.Document, org.w3c.dom.Node, Walker)
methods, but the FormatStack is pushed through to all print* Methods.
AbstractOutputProcessor.buildWalker(FormatStack, List, boolean) method.DOMOutputter,
DOMOutputProcessor| 构造器和说明 |
|---|
AbstractDOMOutputProcessor() |
| 限定符和类型 | 方法和说明 |
|---|---|
org.w3c.dom.Attr |
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.CDATASection |
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.Comment |
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.Document |
process(org.w3c.dom.Document basedoc,
Format format,
Document doc)
This will convert the
to the given DOM
Document. |
org.w3c.dom.Element |
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.EntityReference |
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. |
java.util.List<org.w3c.dom.Node> |
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. |
org.w3c.dom.ProcessingInstruction |
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.Text |
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. |
public org.w3c.dom.Document process(org.w3c.dom.Document basedoc,
Format format,
Document doc)
DOMOutputProcessorDocument to the given DOM
Document.
process 在接口中 DOMOutputProcessorbasedoc - The DOM document to use for the conversionformat - Format instance specifying output styledoc - Document to format.public org.w3c.dom.Element process(org.w3c.dom.Document basedoc,
Format format,
Element element)
DOMOutputProcessorElement using the given DOM
Document to create the resulting DOM Element.process 在接口中 DOMOutputProcessorbasedoc - The DOM document to use for the conversionformat - Format instance specifying output styleelement - Element to format.public java.util.List<org.w3c.dom.Node> process(org.w3c.dom.Document basedoc,
Format format,
java.util.List<? extends Content> list)
DOMOutputProcessorContent using the
given DOM Document to create the resulting list of DOM Nodes.process 在接口中 DOMOutputProcessorbasedoc - The DOM document to use for the conversionformat - Format instance specifying output stylelist - JDOM Content to convert.public org.w3c.dom.CDATASection process(org.w3c.dom.Document basedoc,
Format format,
CDATA cdata)
DOMOutputProcessorCDATA using the given DOM
Document to create the resulting DOM CDATASection.process 在接口中 DOMOutputProcessorbasedoc - The DOM document to use for the conversionformat - Format instance specifying output stylecdata - CDATA to format.public org.w3c.dom.Text process(org.w3c.dom.Document basedoc,
Format format,
Text text)
DOMOutputProcessorText using the given DOM
Document to create the resulting DOM Text.process 在接口中 DOMOutputProcessorbasedoc - The DOM document to use for the conversionformat - Format instance specifying output styletext - Text to format.public org.w3c.dom.Comment process(org.w3c.dom.Document basedoc,
Format format,
Comment comment)
DOMOutputProcessorComment using the given DOM
Document to create the resulting DOM Comment.process 在接口中 DOMOutputProcessorbasedoc - The DOM document to use for the conversionformat - Format instance specifying output stylecomment - Comment to format.public org.w3c.dom.ProcessingInstruction process(org.w3c.dom.Document basedoc,
Format format,
ProcessingInstruction pi)
DOMOutputProcessorProcessingInstruction using
the given DOM Document to create the resulting DOM ProcessingInstruction.process 在接口中 DOMOutputProcessorbasedoc - The DOM document to use for the conversionformat - Format instance specifying output stylepi - ProcessingInstruction to format.public org.w3c.dom.EntityReference process(org.w3c.dom.Document basedoc,
Format format,
EntityRef entity)
DOMOutputProcessorEntityRef using the given DOM
Document to create the resulting DOM EntityReference.process 在接口中 DOMOutputProcessorbasedoc - The DOM document to use for the conversionformat - Format instance specifying output styleentity - EntityRef to format.public org.w3c.dom.Attr process(org.w3c.dom.Document basedoc,
Format format,
Attribute attribute)
DOMOutputProcessorAttribute using the given DOM
Document to create the resulting DOM Attr.process 在接口中 DOMOutputProcessorbasedoc - The DOM document to use for the conversionformat - Format instance specifying output styleattribute - Attribute to format.