Top Description Fields Constructors Methods
com.sun.org.apache.xerces.internal.dom

public Class ProcessingInstructionImpl

extends CharacterDataImpl
implements ProcessingInstruction
Class Inheritance
All Implemented Interfaces
org.w3c.dom.ProcessingInstruction, org.w3c.dom.Node
Known Direct Subclasses
com.sun.org.apache.xerces.internal.dom.DeferredProcessingInstructionImpl
Imports
org.w3c.dom.Node, .ProcessingInstruction

Processing Instructions (PIs) permit documents to carry processor-specific information alongside their actual content. PIs are most common in XML, but they are supported in HTML as well. This class inherits from CharacterDataImpl to reuse its setNodeValue method.
Since
PR-DOM-Level-1-19980818.

Field Summary

Modifier and TypeField and Description
pack-priv static final long
protected String
Inherited from com.sun.org.apache.xerces.internal.dom.CharacterDataImpl:
data

Constructor Summary

AccessConstructor and Description
public
ProcessingInstructionImpl(CoreDocumentImpl ownerDoc, String target, String data)

Factory constructor.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The absolute base URI of this node or null.
getBaseURI
()

Overrides com.sun.org.apache.xerces.internal.dom.NodeImpl.getBaseURI.

Implements org.w3c.dom.Node.getBaseURI.

Returns the absolute base URI of this node or null if the implementation wasn't able to obtain an absolute URI.

public String
getData()

Overrides com.sun.org.apache.xerces.internal.dom.CharacterDataImpl.getData.

Implements org.w3c.dom.ProcessingInstruction.getData.

A PI's data content tells the processor what we actually want it to do.

public String
public short
getNodeType()

Implements abstract com.sun.org.apache.xerces.internal.dom.NodeImpl.getNodeType.

Implements org.w3c.dom.Node.getNodeType.

A short integer indicating what type of node this is.

public String
getTarget()

Implements org.w3c.dom.ProcessingInstruction.getTarget.

A PI's "target" states what processor channel the PI's data should be directed to.

public void
Inherited from com.sun.org.apache.xerces.internal.dom.CharacterDataImpl:
appendDatadeleteDatagetChildNodesgetLengthgetNodeValueinsertDatainternalDeleteDatainternalInsertDatareplaceDatasetNodeValuesetNodeValueInternalsetNodeValueInternalsubstringData

Field Detail

serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides com.sun.org.apache.xerces.internal.dom.CharacterDataImpl.serialVersionUID.

Serialization version.

targetback to summary
protected String target

Constructor Detail

ProcessingInstructionImplback to summary
public ProcessingInstructionImpl(CoreDocumentImpl ownerDoc, String target, String data)

Factory constructor.

Method Detail

getBaseURIback to summary
public String getBaseURI()

Overrides com.sun.org.apache.xerces.internal.dom.NodeImpl.getBaseURI.

Implements org.w3c.dom.Node.getBaseURI.

Returns the absolute base URI of this node or null if the implementation wasn't able to obtain an absolute URI.

Note

If the URI is malformed, a null is returned.

Returns:String

The absolute base URI of this node or null.

Since
DOM Level 3
getDataback to summary
public String getData()

Overrides com.sun.org.apache.xerces.internal.dom.CharacterDataImpl.getData.

Implements org.w3c.dom.ProcessingInstruction.getData.

A PI's data content tells the processor what we actually want it to do. It is defined slightly differently in HTML and XML.

In XML, the data begins with the non-whitespace character immediately after the target &endash; see getTarget().

In HTML, the data begins with the character immediately after the "<?" token that begins the PI.

Note that getNodeValue is aliased to getData

getNodeNameback to summary
public String getNodeName()

Implements abstract com.sun.org.apache.xerces.internal.dom.NodeImpl.getNodeName.

Implements org.w3c.dom.Node.getNodeName.

Returns the target

getNodeTypeback to summary
public short getNodeType()

Implements abstract com.sun.org.apache.xerces.internal.dom.NodeImpl.getNodeType.

Implements org.w3c.dom.Node.getNodeType.

A short integer indicating what type of node this is. The named constants for this value are defined in the org.w3c.dom.Node interface.

getTargetback to summary
public String getTarget()

Implements org.w3c.dom.ProcessingInstruction.getTarget.

A PI's "target" states what processor channel the PI's data should be directed to. It is defined differently in HTML and XML.

In XML, a PI's "target" is the first (whitespace-delimited) token following the " In HTML, target is always null.

Note that getNodeName is aliased to getTarget.

setDataback to summary
public void setData(String data)

Overrides com.sun.org.apache.xerces.internal.dom.CharacterDataImpl.setData.

Implements org.w3c.dom.ProcessingInstruction.setData.

Change the data content of this PI. Note that setData is aliased to setNodeValue.

Exceptions
NO_MODIFICATION_ALLOWED_ERR:
if node is read-only.
See Also
getData().