gnu.xml.dom
Class DomPI

java.lang.Object
  extended by gnu.xml.dom.DomNode
      extended by gnu.xml.dom.DomPI
All Implemented Interfaces:
java.lang.Cloneable, org.w3c.dom.events.DocumentEvent, org.w3c.dom.events.EventTarget, org.w3c.dom.Node, org.w3c.dom.NodeList, org.w3c.dom.ProcessingInstruction

public class DomPI
extends DomNode
implements org.w3c.dom.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.

Version:
$Date: 2001/11/20 04:53:46 $
Author:
David Brownell
See Also:
DomNotation

Field Summary
 
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
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.
 
Method Summary
 java.lang.String getData()
          DOM L1 Returns the data associated with the processing instruction.
 java.lang.String getNodeName()
          DOM L1 Returns the target of the processing instruction (same as getTarget).
 short getNodeType()
          DOM L1 Returns the constant PROCESSING_INSTRUCTION_NODE.
 java.lang.String getNodeValue()
          DOM L1 Returns the data associated with the processing instruction (same as getData).
 java.lang.String getTarget()
          DOM L1 Returns the target of the processing instruction.
 void setData(java.lang.String data)
          DOM L1 Assigns the data associated with the processing instruction; same as setNodeValue.
 void setNodeValue(java.lang.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, createEvent, dispatchEvent, getAttributes, getChildNodes, getElementsByTagName, getElementsByTagNameNS, getFirstChild, getLastChild, getLength, getLocalName, getNamespaceURI, getNextSibling, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isReadonly, isSupported, item, makeReadonly, nameAndTypeEquals, normalize, removeChild, removeEventListener, replaceChild, setPrefix, trimToSize
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setPrefix, setTextContent, setUserData
 

Constructor Detail

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.

Method Detail

getTarget

public final java.lang.String getTarget()
DOM L1 Returns the target of the processing instruction.

Specified by:
getTarget in interface org.w3c.dom.ProcessingInstruction

getNodeName

public final java.lang.String getNodeName()
DOM L1 Returns the target of the processing instruction (same as getTarget).

Specified by:
getNodeName in interface org.w3c.dom.Node

getNodeType

public final short getNodeType()
DOM L1 Returns the constant PROCESSING_INSTRUCTION_NODE.

Specified by:
getNodeType in interface org.w3c.dom.Node

getData

public final java.lang.String getData()
DOM L1 Returns the data associated with the processing instruction.

Specified by:
getData in interface org.w3c.dom.ProcessingInstruction

getNodeValue

public final java.lang.String getNodeValue()
DOM L1 Returns the data associated with the processing instruction (same as getData).

Specified by:
getNodeValue in interface org.w3c.dom.Node
Overrides:
getNodeValue in class DomNode

setData

public final void setData(java.lang.String data)
DOM L1 Assigns the data associated with the processing instruction; same as setNodeValue.

Specified by:
setData in interface org.w3c.dom.ProcessingInstruction

setNodeValue

public final void setNodeValue(java.lang.String data)
DOM L1 Assigns the data associated with the processing instruction.

Specified by:
setNodeValue in interface org.w3c.dom.Node
Overrides:
setNodeValue in class DomNode


Source code is under GPL (with library exception) in the JAXP project at http://www.gnu.org/software/classpathx/jaxp
This documentation was derived from that source code on 2012-01-06.