org.eclipse.ercp.xml.dom
Class ProcessingInstructionImpl
java.lang.Object
org.eclipse.ercp.xml.dom.NodeImpl
org.eclipse.ercp.xml.dom.NSNodeImpl
org.eclipse.ercp.xml.dom.TreeNode
org.eclipse.ercp.xml.dom.CharacterDataImpl
org.eclipse.ercp.xml.dom.ProcessingInstructionImpl
- All Implemented Interfaces:
- Node, NodeList, ProcessingInstruction
public class ProcessingInstructionImpl
- extends CharacterDataImpl
- implements ProcessingInstruction
Field Summary |
protected java.lang.String |
target
|
Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
Method Summary |
Node |
cloneNode(boolean deep)
Returns a duplicate of this node, i.e., serves as a generic copy
constructor for nodes. |
java.lang.String |
getNodeName()
The name of this node, depending on its type; see the table above. |
short |
getNodeType()
A code representing the type of the underlying object, as defined above. |
java.lang.String |
getTarget()
The target of this processing instruction. |
Methods inherited from class org.eclipse.ercp.xml.dom.TreeNode |
appendChild, getElementByTagName, getElementsByTagName, getElementsByTagNameNS, getFirstChild, getLastChild, getLength, getNextSibling, getParentNode, getPreviousSibling, hasChildNodes, insertBefore, item, normalize, removeChild, replaceChild |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.w3c.dom.Node |
appendChild, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix |
target
protected java.lang.String target
ProcessingInstructionImpl
public ProcessingInstructionImpl(DocumentImpl ownerDocument,
java.lang.String target,
java.lang.String data)
- Constructor for ProcessingInstructionImpl
getTarget
public java.lang.String getTarget()
- 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
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
getNodeName
public java.lang.String getNodeName()
- Description copied from class:
NSNodeImpl
- The name of this node, depending on its type; see the table above.
- Specified by:
getNodeName
in interface Node
- Overrides:
getNodeName
in class NSNodeImpl
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
.).
Cloning an Element
copies all attributes and their
values, including those generated by the XML processor to represent
defaulted attributes, but this method does not copy any text it
contains unless it is a deep clone, since the text is contained in a
child Text
node. Cloning an Attribute
directly, as opposed to be cloned as part of an Element
cloning operation, returns a specified attribute (
specified
is true
). Cloning any other type
of node simply returns a copy of this node.
Note that cloning an immutable subtree results in a mutable copy,
but the children of an EntityReference
clone are readonly
. In addition, clones of unspecified Attr
nodes are
specified. And, cloning Document
,
DocumentType
, Entity
, and
Notation
nodes is implementation dependent.
- Specified by:
cloneNode
in interface Node
- Parameters:
deepIf
- true
, recursively clone the subtree under
the specified node; if false
, clone only the node
itself (and its attributes, if it is an Element
).
- Returns:
- The duplicate node.