gnu.xml.dom

Class DomPI

Implemented Interfaces:
Cloneable, Comparable, DocumentEvent, EventTarget, Node, NodeList, ProcessingInstruction

public class DomPI
extends DomNode
implements ProcessingInstruction

"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.

See Also:
DomNotation

Fields inherited from interface org.w3c.dom.Node

ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE

Constructor Summary

DomPI(DomDocument owner, String target, String data)
Constructs a ProcessingInstruction node associated with the specified document, with the specified data.

Method Summary

String
getData()
DOM L1 Returns the data associated with the processing instruction.
String
getNodeName()
DOM L1 Returns the target of the processing instruction (same as getTarget).
String
getNodeValue()
DOM L1 Returns the data associated with the processing instruction (same as getData).
String
getTarget()
DOM L1 Returns the target of the processing instruction.
void
setData(String data)
DOM L1 Assigns the data associated with the processing instruction; same as setNodeValue.
void
setNodeValue(String data)
DOM L1 Assigns the data associated with the processing instruction.

Methods inherited from class gnu.xml.dom.DomNode

addEventListener, appendChild, clone, cloneNode, compact, compareDocumentPosition, compareTo, createEvent, dispatchEvent, getAttributes, getBaseURI, getChildNodes, getElementsByTagName, getElementsByTagNameNS, getFeature, getFirstChild, getLastChild, getLength, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isReadonly, isSameNode, isSupported, item, lookupNamespaceURI, lookupPrefix, makeReadonly, nameAndTypeEquals, normalize, removeChild, removeEventListener, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData, toString, trimToSize

Constructor Details

DomPI

protected DomPI(DomDocument owner,
                String target,
                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.

Method Details

getData

public final String getData()
DOM L1 Returns the data associated with the processing instruction.
Specified by:
getData in interface ProcessingInstruction


getNodeName

public final String getNodeName()
DOM L1 Returns the target of the processing instruction (same as getTarget).
Specified by:
getNodeName in interface Node
Overrides:
getNodeName in interface DomNode


getNodeValue

public final String getNodeValue()
DOM L1 Returns the data associated with the processing instruction (same as getData).
Specified by:
getNodeValue in interface Node
Overrides:
getNodeValue in interface DomNode


getTarget

public final String getTarget()
DOM L1 Returns the target of the processing instruction.
Specified by:
getTarget in interface ProcessingInstruction


setData

public final void setData(String data)
DOM L1 Assigns the data associated with the processing instruction; same as setNodeValue.
Specified by:
setData in interface ProcessingInstruction


setNodeValue

public final void setNodeValue(String data)
DOM L1 Assigns the data associated with the processing instruction.
Specified by:
setNodeValue in interface Node
Overrides:
setNodeValue in interface DomNode