Class ProcessingInstructionImpl

  • All Implemented Interfaces:
    java.lang.Cloneable, org.w3c.dom.events.EventTarget, org.w3c.dom.Node, org.w3c.dom.NodeList, org.w3c.dom.ProcessingInstruction

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

    • Field Detail

      • target_

        private final java.lang.String target_
    • Constructor Detail

      • ProcessingInstructionImpl

        public ProcessingInstructionImpl​(CoreDocumentImpl ownerDoc,
                                         java.lang.String target,
                                         java.lang.String data)
    • Method Detail

      • 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 org.w3c.dom.Node
        Specified by:
        getNodeType in class NodeImpl
      • getNodeName

        public java.lang.String getNodeName()
        the name of this node. Returns the target
        Specified by:
        getNodeName in interface org.w3c.dom.Node
        Specified by:
        getNodeName in class NodeImpl
      • getTarget

        public java.lang.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 org.w3c.dom.ProcessingInstruction
      • getBaseURI

        public java.lang.String getBaseURI()
        The absolute base URI of this node or null if undefined. This value is computed according to . However, when the Document supports the feature "HTML" , the base URI is computed using first the value of the href attribute of the HTML BASE element if any, and the value of the documentURI attribute from the Document interface otherwise.
        When the node is an Element, a Document or a a ProcessingInstruction, this attribute represents the properties [base URI] defined in . When the node is a Notation, an Entity, or an EntityReference, this attribute represents the properties [declaration base URI] in the . How will this be affected by resolution of relative namespace URIs issue?It's not.Should this only be on Document, Element, ProcessingInstruction, Entity, and Notation nodes, according to the infoset? If not, what is it equal to on other nodes? Null? An empty string? I think it should be the parent's.No.Should this be read-only and computed or and actual read-write attribute?Read-only and computed (F2F 19 Jun 2000 and teleconference 30 May 2001).If the base HTML element is not yet attached to a document, does the insert change the Document.baseURI? Yes. (F2F 26 Sep 2001) 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 org.w3c.dom.Node
        Overrides:
        getBaseURI in class NodeImpl
        Returns:
        The absolute base URI of this node or null.