|
UTF-X, Unit Testing Framework - Xslt | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object utfx.util.DOMWriter
public class DOMWriter
DOMWriter.
Copyright © 2004 - University of Southern Queensland.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
$Source: /cvs/utf-x/framework/src/java/utfx/util/DOMWriter.java,v $
Field Summary | |
---|---|
private static java.lang.String |
ENCODING
Encoding of the printWriter we are using |
private boolean |
escapeQuoteCharacters
True to escape single and double quote characters |
private java.io.PrintWriter |
out
The print writer to output the DOM document |
private boolean |
stripWhiteSpace
True to strip white space surrounding elements |
Constructor Summary | |
---|---|
DOMWriter(java.io.OutputStream os)
Creates a DOMWriter for pretty printing the DOM. |
|
DOMWriter(java.io.OutputStream os,
boolean strip)
Creates a DOMWriter for pretty printing the DOM. |
|
DOMWriter(java.io.OutputStream os,
boolean stripWhiteSpace,
boolean escapeQuoteCharacters)
Creates a DOMWriter for pretty printing the DOM. |
Method Summary | |
---|---|
protected java.lang.String |
normalize(java.lang.String s,
boolean escapeQuoteCharacters)
Converts characters to their appropriate XML entity reference. |
void |
print(org.w3c.dom.Node node)
Prints any node in the DOM including the Document Element and any Doctype elements, recursively calls it self to print child elements. |
protected org.w3c.dom.Attr[] |
sortAttributes(org.w3c.dom.NamedNodeMap attrs)
Sorts element attributes into alphabetical order I dont know why this is necessary. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static java.lang.String ENCODING
private java.io.PrintWriter out
private boolean stripWhiteSpace
private boolean escapeQuoteCharacters
Constructor Detail |
---|
public DOMWriter(java.io.OutputStream os) throws java.lang.Exception
os
- The output stream to write the XML to
java.lang.Exception
public DOMWriter(java.io.OutputStream os, boolean strip) throws java.lang.Exception
os
- The output stream to write the XML tostrip
- True to strip the white space surrounding elements
java.lang.Exception
public DOMWriter(java.io.OutputStream os, boolean stripWhiteSpace, boolean escapeQuoteCharacters) throws java.lang.Exception
os
- The output stream to write the XML tostripWhiteSpace
- True to strip the white space surrounding elementsescapeQuoteCharacters
- True to escape single and double quote
characters
java.lang.Exception
Method Detail |
---|
public void print(org.w3c.dom.Node node)
node
- the node to start printing from (usually the root).protected java.lang.String normalize(java.lang.String s, boolean escapeQuoteCharacters)
s
- the string to normalizeescapeQuoteCharacters
- whether to escape quote charactersprotected org.w3c.dom.Attr[] sortAttributes(org.w3c.dom.NamedNodeMap attrs)
|
UTF-X, Unit Testing Framework - Xslt | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |