public class

DomWriter

extends Object
java.lang.Object
   ↳ org.mybatis.generator.internal.DomWriter

Class Overview

This class is used to generate a String representation of an XML document. It is very much based on the class dom.Writer from the Apache Xerces examples, but I've simplified and updated it.

Summary

Fields
protected boolean isXML11
protected PrintWriter printWriter
Public Constructors
DomWriter()
Public Methods
synchronized String toString(Document document)
Protected Methods
String getVersion(Document document)
Extracts the XML version from the Document.
void normalizeAndPrint(char c, boolean isAttValue)
Normalizes and print the given character.
void normalizeAndPrint(String s, boolean isAttValue)
Normalizes and prints the given string.
Attr[] sortAttributes(NamedNodeMap attrs)
Returns a sorted list of attributes.
void write(CDATASection node)
void write(Comment node)
void write(Document node)
void write(DocumentType node)
void write(Element node)
void write(EntityReference node)
void write(ProcessingInstruction node)
void write(Text node)
void writeAnyNode(Node node)
[Expand]
Inherited Methods
From class java.lang.Object

Fields

protected boolean isXML11

protected PrintWriter printWriter

Public Constructors

public DomWriter ()

Public Methods

public synchronized String toString (Document document)

Protected Methods

protected String getVersion (Document document)

Extracts the XML version from the Document.

protected void normalizeAndPrint (char c, boolean isAttValue)

Normalizes and print the given character.

protected void normalizeAndPrint (String s, boolean isAttValue)

Normalizes and prints the given string.

protected Attr[] sortAttributes (NamedNodeMap attrs)

Returns a sorted list of attributes.

protected void write (CDATASection node)

protected void write (Comment node)

protected void write (Document node)

protected void write (DocumentType node)

protected void write (Element node)

protected void write (EntityReference node)

protected void write (ProcessingInstruction node)

protected void write (Text node)

protected void writeAnyNode (Node node)