Class ProcessingInstructionImpl

All Implemented Interfaces:
Serializable, Cloneable, EventTarget, Node, NodeList, ProcessingInstruction
Direct Known Subclasses:
DeferredProcessingInstructionImpl

public class ProcessingInstructionImpl extends CharacterDataImpl implements 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.

INTERNAL:

Usage of this class is not supported. It may be altered or removed at any time.
Since:
PR-DOM-Level-1-19980818.
Version:
$Id: ProcessingInstructionImpl.java 890194 2009-12-14 06:33:17Z mrglavas $
See Also:
  • Field Details

    • target

      protected String target
  • Constructor Details

    • ProcessingInstructionImpl

      public ProcessingInstructionImpl(CoreDocumentImpl ownerDoc, String target, String data)
      Factory constructor.
  • Method Details

    • getNodeType

      public short 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.
      Specified by:
      getNodeType in interface Node
      Specified by:
      getNodeType in class NodeImpl
    • getNodeName

      public String getNodeName()
      Returns the target
      Specified by:
      getNodeName in interface Node
      Specified by:
      getNodeName in class NodeImpl
    • getTarget

      public String 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 "invalid input: '<'?" token that begins the PI.

      In HTML, target is always null.

      Note that getNodeName is aliased to getTarget.

      Specified by:
      getTarget in interface ProcessingInstruction
    • getBaseURI

      public String 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.
      Specified by:
      getBaseURI in interface Node
      Overrides:
      getBaseURI in class NodeImpl
      Returns:
      The absolute base URI of this node or null.
      Since:
      DOM Level 3