gnu.xml.dom
Class DomPI
java.lang.Object
|
+--gnu.xml.dom.DomNode
|
+--gnu.xml.dom.DomPI
All Implemented Interfaces:
ProcessingInstruction, Node, NodeList, EventTarget, DocumentEvent, Cloneable
"ProcessingInstruction" (PI) implementation.
This is a non-core DOM class, supporting the "XML" feature.
Unlike other DOM APIs in the "XML" feature, this one fully
exposes the functionality it describes. So there is no reason
inherent in DOM to avoid using this API, unless you want to rely
on NOTATION declarations to associate meaning with your PIs;
there is no vendor-neutal way to record those notations in DOM.
Also of note is that PI support is part of SAX, so that XML
systems using PIs can choose among multiple APIs.
Author:See Also:
DomPI
protected DomPI(org.w3c.dom.Document owner, java.lang.String target, java.lang.String data)
Constructs a ProcessingInstruction node associated with the
specified document, with the specified data.
This constructor should only be invoked by a Document object as
part of its createProcessingInstruction functionality, or through
a subclass which is similarly used in a "Sub-DOM" style layer.
Parameters:
getData
public final String getData()
DOM L1
Returns the data associated with the processing instruction.
getNodeName
public final String getNodeName()
DOM L1
Returns the target of the processing instruction
(same as getTarget).
getNodeType
public final short getNodeType()
DOM L1
Returns the constant PROCESSING_INSTRUCTION_NODE.
getNodeValue
public final String getNodeValue()
DOM L1
Returns the data associated with the processing instruction
(same as getData).
getTarget
public final String getTarget()
DOM L1
Returns the target of the processing instruction.
setData
public final void setData(java.lang.String data)
DOM L1
Assigns the data associated with the processing instruction;
same as setNodeValue.
Parameters:
setNodeValue
public final void setNodeValue(java.lang.String data)
DOM L1
Assigns the data associated with the processing instruction.
Parameters:
"ProcessingInstruction" (PI) implementation. This is a non-core DOM class, supporting the "XML" feature.
Unlike other DOM APIs in the "XML" feature, this one fully exposes the functionality it describes. So there is no reason inherent in DOM to avoid using this API, unless you want to rely on NOTATION declarations to associate meaning with your PIs; there is no vendor-neutal way to record those notations in DOM.
Also of note is that PI support is part of SAX, so that XML systems using PIs can choose among multiple APIs.