Class ProcessingInstructionImpl

All Implemented Interfaces:
Node, ProcessingInstruction

public final class ProcessingInstructionImpl
extends LeafNodeImpl
implements ProcessingInstruction
Provides a straightforward implementation of the corresponding W3C DOM interface. The class is used internally only, thus only notable members that are not in the original interface are documented (the W3C docs are quite extensive). Hope that's ok.

Some of the fields may have package visibility, so other classes belonging to the DOM implementation can easily access them while maintaining the DOM tree structure.

  • Method Details

    • getData

      public String getData()
      Description copied from interface: ProcessingInstruction
      The content of this processing instruction. This is from the first non white space character after the target to the character immediately preceding the ?>.
      Specified by:
      getData in interface ProcessingInstruction
    • getNodeName

      public String getNodeName()
      Description copied from interface: Node
      The name of this node, depending on its type; see the table above.
      Specified by:
      getNodeName in interface Node
      Overrides:
      getNodeName in class NodeImpl
    • getNodeType

      public short getNodeType()
      Description copied from interface: Node
      A code representing the type of the underlying object, as defined above.
      Specified by:
      getNodeType in interface Node
      Specified by:
      getNodeType in class NodeImpl
    • getNodeValue

      public String getNodeValue()
      Description copied from interface: Node
      The value of this node, depending on its type; see the table above. When it is defined to be null, setting it has no effect, including if the node is read-only.
      Specified by:
      getNodeValue in interface Node
      Overrides:
      getNodeValue in class NodeImpl
    • getTarget

      public String getTarget()
      Description copied from interface: ProcessingInstruction
      The target of this processing instruction. XML defines this as being the first token following the markup that begins the processing instruction.
      Specified by:
      getTarget in interface ProcessingInstruction
    • setData

      public void setData​(String data) throws DOMException
      Description copied from interface: ProcessingInstruction
      The content of this processing instruction. This is from the first non white space character after the target to the character immediately preceding the ?>.
      Specified by:
      setData in interface ProcessingInstruction
      Throws:
      DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.