|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.sc.seis.fissuresUtil.xml.Writer
public class Writer
A sample DOM writer. This sample program illustrates how to traverse a DOM tree in order to print a document that is parsed.
Field Summary | |
---|---|
protected static boolean |
DEFAULT_CANONICAL
Default canonical output (false). |
protected static boolean |
DEFAULT_NAMESPACES
Default namespaces support (true). |
protected static java.lang.String |
DEFAULT_PARSER_NAME
Default parser name. |
protected static boolean |
DEFAULT_SCHEMA_FULL_CHECKING
Default Schema full checking support (false). |
protected static boolean |
DEFAULT_SCHEMA_VALIDATION
Default Schema validation support (false). |
protected static boolean |
DEFAULT_VALIDATION
Default validation support (false). |
protected boolean |
fCanonical
Canonical output. |
protected java.io.PrintWriter |
fOut
Print writer. |
protected static java.lang.String |
LEXICAL_HANDLER_PROPERTY_ID
Lexical handler property id (http://xml.org/sax/properties/lexical-handler). |
protected static java.lang.String |
NAMESPACES_FEATURE_ID
Namespaces feature id (http://xml.org/sax/features/namespaces). |
protected boolean |
printNewlines
Print newlines after end elements |
protected static java.lang.String |
SCHEMA_FULL_CHECKING_FEATURE_ID
Schema full checking feature id (http://apache.org/xml/features/validation/schema-full-checking). |
protected static java.lang.String |
SCHEMA_VALIDATION_FEATURE_ID
Schema validation feature id (http://apache.org/xml/features/validation/schema). |
protected static java.lang.String |
VALIDATION_FEATURE_ID
Validation feature id (http://xml.org/sax/features/validation). |
Constructor Summary | |
---|---|
Writer()
Default constructor. |
|
Writer(boolean canonical)
|
|
Writer(boolean canonical,
boolean printNewlines)
|
Method Summary | |
---|---|
protected void |
normalizeAndPrint(char c)
Normalizes and print the given character. |
protected void |
normalizeAndPrint(java.lang.String s)
Normalizes and prints the given string. |
void |
setCanonical(boolean canonical)
Sets whether output is canonical. |
void |
setOutput(java.io.OutputStream stream,
java.lang.String encoding)
Sets the output stream for printing. |
void |
setOutput(java.io.Writer writer)
Sets the output writer. |
protected org.w3c.dom.Attr[] |
sortAttributes(org.w3c.dom.NamedNodeMap attrs)
Returns a sorted list of attributes. |
void |
write(org.w3c.dom.Node node)
Writes the specified node, recursively. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String NAMESPACES_FEATURE_ID
protected static final java.lang.String VALIDATION_FEATURE_ID
protected static final java.lang.String SCHEMA_VALIDATION_FEATURE_ID
protected static final java.lang.String SCHEMA_FULL_CHECKING_FEATURE_ID
protected static final java.lang.String LEXICAL_HANDLER_PROPERTY_ID
protected static final java.lang.String DEFAULT_PARSER_NAME
protected static final boolean DEFAULT_NAMESPACES
protected static final boolean DEFAULT_VALIDATION
protected static final boolean DEFAULT_SCHEMA_VALIDATION
protected static final boolean DEFAULT_SCHEMA_FULL_CHECKING
protected static final boolean DEFAULT_CANONICAL
protected java.io.PrintWriter fOut
protected boolean fCanonical
protected boolean printNewlines
Constructor Detail |
---|
public Writer()
public Writer(boolean canonical)
public Writer(boolean canonical, boolean printNewlines)
Method Detail |
---|
public void setCanonical(boolean canonical)
public void setOutput(java.io.OutputStream stream, java.lang.String encoding) throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
public void setOutput(java.io.Writer writer)
public void write(org.w3c.dom.Node node)
protected org.w3c.dom.Attr[] sortAttributes(org.w3c.dom.NamedNodeMap attrs)
protected void normalizeAndPrint(java.lang.String s)
protected void normalizeAndPrint(char c)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |