com.aspose.html.dom

Class ProcessingInstruction

  • All Implemented Interfaces:
    IEventTarget, IXPathNSResolver, com.aspose.ms.System.IDisposable


    @DOMObjectAttribute
     @DOMNameAttribute(name="ProcessingInstruction")
    public class ProcessingInstruction
    extends Node

    The ProcessingInstruction represents a "processing instruction", used in XML as a way to keep processor-specific information in the text of the document.

    • Constructor Detail

      • ProcessingInstruction

        public ProcessingInstruction(String target,
                                     String data,
                                     Document doc)

        Initializes a new instance of the ProcessingInstruction class.

        Parameters:
        target - The target.
        data - The instruction data.
        doc - The document.
    • Method Detail

      • setData

        @DOMNameAttribute(name="data")
        public void setData(String value)

        The content of this processing instruction.

        Value: The data.
      • getNodeName

        public String getNodeName()

        The name of this node, depending on its type.

        Value: The name of the node.
        Specified by:
        getNodeName in class Node
      • getLocalName

        public String getLocalName()

        Returns the local part of the qualified name of this node. For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as Document.createElement(), this is always null.

        Value: The name of the local.
        Overrides:
        getLocalName in class Node
      • getNodeType

        public int getNodeType()

        A code representing the type of the underlying object.

        Value: The type of the node.
        Specified by:
        getNodeType in class Node
      • cloneNode

        public Node cloneNode(boolean deep)

        Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes. The duplicate node has no parent (parentNode is null) and no user data.

        Specified by:
        cloneNode in class Node
        Parameters:
        deep - if set to true [deep].
        Returns:
        Returns node