Class ProcessingInstructionImpl

All Implemented Interfaces:
Cloneable, EventTarget, Node, NodeList, ProcessingInstruction

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.

  • Constructor Details

  • 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. 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 name of this node. 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 "<?" 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.