jimm.twice.xml.dom
Class Element
java.lang.Object
jimm.twice.xml.dom.Element
- Direct Known Subclasses:
- NamedElement, Text
- public abstract class Element
- extends java.lang.Object
The abstract base class of almost all XML entites.
- Author:
- Jim Menard, jimm@io.com
Method Summary |
void |
writeTo(java.io.OutputStream out)
Writes this element as an XML string. |
abstract void |
writeTo(java.io.OutputStream out,
int openOrClose)
Writes this element as an XML string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OPEN_TAG
public static final int OPEN_TAG
- See Also:
- Constant Field Values
CLOSE_TAG
public static final int CLOSE_TAG
- See Also:
- Constant Field Values
OPEN_AND_CLOSE_TAG
public static final int OPEN_AND_CLOSE_TAG
- See Also:
- Constant Field Values
Element
public Element()
writeTo
public void writeTo(java.io.OutputStream out)
throws java.io.IOException
- Writes this element as an XML string. Calls
writeTo(OutputStream, int)
with the argument
OPEN_AND_CLOSE_TAG
.
- Parameters:
out
- the output writer
- Throws:
java.io.IOException
- See Also:
writeTo(OutputStream, int)
writeTo
public abstract void writeTo(java.io.OutputStream out,
int openOrClose)
throws java.io.IOException
- Writes this element as an XML string. The parameter
openOrClose
determines if the open tag
(OPEN_TAG
), close tag (CLOSE_TAG
), or both
(OPEN_AND_CLOSE_TAG
) should be returned.
- Parameters:
out
- the output writeropenOrClose
- one of OPEN_TAG
, CLOSE_TAG
,
or OPEN_AND_CLOSE_TAG
- Throws:
java.io.IOException