This class is marked abstract even though all methods are fully implemented. The 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 {@link Format} classcan 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.
One significant feature of this implementation is that it creates and maintains both a {@link NamespaceStack} and {@link FormatStack} that aremanaged in the {@link #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 {@link #printElement(FormatStack,NamespaceStack,org.w3c.dom.Document,Element)}and {@link #printContent(FormatStack,NamespaceStack,org.w3c.dom.Document,org.w3c.dom.Node,Walker)}methods, but the FormatStack is pushed through to all print* Methods.
This class delegates the formatting of the content to the Walker classes and you can create your own custom walker by overriding the {@link #buildWalker(FormatStack,List,boolean)} method. @see DOMOutputter @see DOMOutputProcessor @since JDOM2 @author Rolf Lear
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|