jimm.twice.xml.dom
Class ProcessingInstruction
java.lang.Object
jimm.twice.xml.dom.Element
jimm.twice.xml.dom.NamedElement
jimm.twice.xml.dom.ProcessingInstruction
- public class ProcessingInstruction
- extends NamedElement
Used for all processing instructions except '' (for
that use XMLDecl
).
- Author:
- Jim Menard, jimm@io.com
Field Summary |
protected java.lang.String |
text
|
Method Summary |
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 |
text
protected java.lang.String text
ProcessingInstruction
public ProcessingInstruction(java.lang.String name)
- Constructor.
- Parameters:
name
- the processing instruction's name
ProcessingInstruction
public ProcessingInstruction(java.lang.String name,
java.lang.String text)
- Constructor.
- Parameters:
name
- the processing instruction's nametext
- the text to appear inside the processing instruction after the
name; may be null
writeTo
public void writeTo(java.io.OutputStream out,
int openOrClose)
throws java.io.IOException
- Description copied from class:
Element
- 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.
- Specified by:
writeTo
in class Element
- Parameters:
out
- the output writeropenOrClose
- one of OPEN_TAG
, CLOSE_TAG
,
or OPEN_AND_CLOSE_TAG
- Throws:
java.io.IOException