Class ProcessingInstructionImpl
- java.lang.Object
-
- org.htmlunit.cyberneko.xerces.dom.NodeImpl
-
- org.htmlunit.cyberneko.xerces.dom.ChildNode
-
- org.htmlunit.cyberneko.xerces.dom.CharacterDataImpl
-
- org.htmlunit.cyberneko.xerces.dom.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 Summary
Fields Modifier and Type Field Description private java.lang.String
target_
-
Fields inherited from class org.htmlunit.cyberneko.xerces.dom.CharacterDataImpl
data_
-
Fields inherited from class org.htmlunit.cyberneko.xerces.dom.ChildNode
nextSibling_, previousSibling_
-
Fields inherited from class org.htmlunit.cyberneko.xerces.dom.NodeImpl
DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_IS_CONTAINED, DOCUMENT_POSITION_PRECEDING, FIRSTCHILD, HASSTRING, ID, NORMALIZED, OWNED, ownerNode_, READONLY, SPECIFIED, SYNCCHILDREN
-
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
-
-
Constructor Summary
Constructors Constructor Description ProcessingInstructionImpl(CoreDocumentImpl ownerDoc, java.lang.String target, java.lang.String data)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getBaseURI()
The absolute base URI of this node ornull
if undefined.java.lang.String
getNodeName()
the name of this node.short
getNodeType()
A short integer indicating what type of node this is.java.lang.String
getTarget()
A PI's "target" states what processor channel the PI's data should be directed to.-
Methods inherited from class org.htmlunit.cyberneko.xerces.dom.CharacterDataImpl
appendData, deleteData, getChildNodes, getData, getLength, getNodeValue, insertData, internalDeleteData, internalInsertData, replaceData, setData, setNodeValue, setNodeValueInternal, setNodeValueInternal, substringData
-
Methods inherited from class org.htmlunit.cyberneko.xerces.dom.ChildNode
cloneNode, getNextSibling, getParentNode, getPreviousSibling, parentNode, previousSibling
-
Methods inherited from class org.htmlunit.cyberneko.xerces.dom.NodeImpl
addEventListener, appendChild, changed, changes, compareDocumentPosition, dispatchEvent, getAttributes, getElementAncestor, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNodeNumber, getOwnerDocument, getPrefix, getTextContent, getTextContent, getUserData, hasAttributes, hasChildNodes, hasStringValue, hasStringValue, insertBefore, isDefaultNamespace, isEqualNode, isFirstChild, isFirstChild, isIdAttribute, isIdAttribute, isNormalized, isNormalized, isOwned, isOwned, isSameNode, isSpecified, isSpecified, isSupported, item, lookupNamespacePrefix, lookupNamespaceURI, lookupPrefix, needsSyncChildren, needsSyncChildren, normalize, ownerDocument, removeChild, removeEventListener, replaceChild, setOwnerDocument, setPrefix, setTextContent, setUserData, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
-
-
-
-
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 interfaceorg.w3c.dom.Node
- Specified by:
getNodeType
in classNodeImpl
-
getNodeName
public java.lang.String getNodeName()
the name of this node. Returns the target- Specified by:
getNodeName
in interfaceorg.w3c.dom.Node
- Specified by:
getNodeName
in classNodeImpl
-
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 interfaceorg.w3c.dom.ProcessingInstruction
-
getBaseURI
public java.lang.String getBaseURI()
The absolute base URI of this node ornull
if undefined. This value is computed according to . However, when theDocument
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 thedocumentURI
attribute from theDocument
interface otherwise.
When the node is anElement
, aDocument
or a aProcessingInstruction
, this attribute represents the properties [base URI] defined in . When the node is aNotation
, anEntity
, or anEntityReference
, 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 interfaceorg.w3c.dom.Node
- Overrides:
getBaseURI
in classNodeImpl
- Returns:
- The absolute base URI of this node or null.
-
-