|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.enhydra.xml.io.DOMFormatter
Class for formatting DOMs into a documents. The class handles XML and HTML pages, looking up the approriate formatting routines based on the document type. It has an associated OutputOptions object that controls the formatting. Instances are reusable and multithreaded.
Constructor Summary | |
DOMFormatter()
Construct a new XML formatter with default output options. |
|
DOMFormatter(OutputOptions outputOptions)
Construct a new XML formatter with the specified output options. |
Method Summary | |
static OutputOptions |
getDefaultOutputOptions(Document doc)
Get the default OutputOptions for a document. |
static Formatter |
getFormatter(Node node,
OutputOptions outputOptions,
boolean forPreFormatting)
|
OutputOptions |
getOutputOptions()
Get the output options. |
void |
setOutputOptions(OutputOptions outputOptions)
Set the output options. |
byte[] |
toBytes(Node node)
Format a document or any node and its children into a byte array using the current encoding. |
String |
toString(Node node)
Format a document or any node and its children into a string. |
void |
write(Node node,
File out)
Output a document or any node and its children to a File. |
void |
write(Node node,
OutputStream out)
Output a document or any node and its children to a OutputStream. |
void |
write(Node node,
Writer writer)
Output a document or any node and its children to a Writer. |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public DOMFormatter(OutputOptions outputOptions)
outputOptions
- The OutputOptions to use for formatters
obtained from this object.public DOMFormatter()
Method Detail |
public OutputOptions getOutputOptions()
public void setOutputOptions(OutputOptions outputOptions)
public static OutputOptions getDefaultOutputOptions(Document doc)
public static Formatter getFormatter(Node node, OutputOptions outputOptions, boolean forPreFormatting)
public String toString(Node node)
public byte[] toBytes(Node node) throws IOException
public void write(Node node, Writer writer) throws IOException
public void write(Node node, OutputStream out) throws IOException
public void write(Node node, File out) throws IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |