|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gnu.xml.dom.DomNode | +--gnu.xml.dom.DomPI
"ProcessingInstruction" (PI) implementation. This is a non-core DOM class, supporting the "XML" feature.
Unlike other DOM APIs in the "XML" feature, this one fully exposes the functionality it describes. So there is no reason inherent in DOM to avoid using this API, unless you want to rely on NOTATION declarations to associate meaning with your PIs; there is no vendor-neutal way to record those notations in DOM.
Also of note is that PI support is part of SAX, so that XML systems using PIs can choose among multiple APIs.
DomNotation
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 |
Constructor Summary | |
protected |
DomPI(Document owner,
java.lang.String target,
java.lang.String data)
Constructs a ProcessingInstruction node associated with the specified document, with the specified data. |
Method Summary | |
java.lang.String |
getData()
DOM L1 Returns the data associated with the processing instruction. |
java.lang.String |
getNodeName()
DOM L1 Returns the target of the processing instruction (same as getTarget). |
java.lang.String |
getNodeValue()
DOM L1 Returns the data associated with the processing instruction (same as getData). |
java.lang.String |
getTarget()
DOM L1 Returns the target of the processing instruction. |
void |
setData(java.lang.String data)
DOM L1 Assigns the data associated with the processing instruction; same as setNodeValue. |
void |
setNodeValue(java.lang.String data)
DOM L1 Assigns the data associated with the processing instruction. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.w3c.dom.Node |
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeType, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setPrefix |
Constructor Detail |
protected DomPI(Document owner, java.lang.String target, java.lang.String data)
This constructor should only be invoked by a Document object as part of its createProcessingInstruction functionality, or through a subclass which is similarly used in a "Sub-DOM" style layer.
Method Detail |
public final java.lang.String getTarget()
getTarget
in interface ProcessingInstruction
public final java.lang.String getNodeName()
getNodeName
in interface Node
public final java.lang.String getData()
getData
in interface ProcessingInstruction
org.w3c.dom.ProcessingInstruction
DOMException
- NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.public final java.lang.String getNodeValue()
getNodeValue
in interface Node
getNodeValue
in class DomNode
org.w3c.dom.Node
DOMException
- NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.DOMException
- DOMSTRING_SIZE_ERR: Raised when it would return more characters than
fit in a DOMString
variable on the implementation
platform.public final void setData(java.lang.String data)
setData
in interface ProcessingInstruction
public final void setNodeValue(java.lang.String data)
setNodeValue
in interface Node
setNodeValue
in class DomNode
|
Source code is GPL'd in the JAXP subproject at http://savannah.gnu.org/projects/classpathx |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |