public class ProcessingInstruction extends AbstractItem implements org.w3c.dom.ProcessingInstruction
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
_rawData
The raw data.
|
protected java.lang.String |
_target
The target.
|
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_NODEFIND_BY_PREFIX, FIND_BY_REGEX, FIND_BY_TAGNAME, FIND_IGNORE_CASE, FIND_RECURSIVE| Modifier | Constructor and Description |
|---|---|
protected |
ProcessingInstruction()
Constructor.
|
|
ProcessingInstruction(java.lang.String target,
java.util.Map<java.lang.String,java.lang.String> data)
Constructor.
|
|
ProcessingInstruction(java.lang.String target,
java.lang.String data)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getData() |
java.lang.String |
getName()
Gets the name of the item.
|
short |
getNodeType() |
java.lang.String |
getTarget() |
java.lang.String |
getText()
|
java.util.Map<java.lang.String,java.lang.String> |
parseData()
Returns the parsed data in the form of Map (never null).
|
static java.util.Map<java.lang.String,java.lang.String> |
parseToMap(java.util.Map<java.lang.String,java.lang.String> map,
java.lang.String rawData)
Parses the raw data into a map.
|
void |
setData(java.util.Map<java.lang.String,java.lang.String> data)
Sets the raw data with a data map.
|
void |
setData(java.lang.String data) |
void |
setName(java.lang.String name)
Sets the name of the item.
|
void |
setTarget(java.lang.String target) |
void |
setText(java.lang.String text)
Sets the text of this item.
|
java.lang.String |
toString() |
appendChild, clone, cloneNode, compareDocumentPosition, detach, equals, getAttributes, getBaseURI, getChildNodes, getDocument, getFeature, getFirstChild, getLastChild, getLocalName, getLocator, getNamespaceURI, getNextSibling, getNodeName, getNodeValue, getOwnerDocument, getParent, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, hashCode, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, match, normalize, removeChild, replaceChild, setLocator, setNodeValue, setParent, setPrefix, setTextContent, setUserDatafinalize, getClass, notify, notifyAll, wait, wait, waitappendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserDataprotected java.lang.String _target
protected java.lang.String _rawData
public ProcessingInstruction(java.lang.String target,
java.lang.String data)
public ProcessingInstruction(java.lang.String target,
java.util.Map<java.lang.String,java.lang.String> data)
protected ProcessingInstruction()
public final java.lang.String getTarget()
getTarget in interface org.w3c.dom.ProcessingInstructionpublic final void setTarget(java.lang.String target)
public final java.lang.String getData()
getData in interface org.w3c.dom.ProcessingInstructionpublic final void setData(java.lang.String data)
setData in interface org.w3c.dom.ProcessingInstructionpublic final java.util.Map<java.lang.String,java.lang.String> parseData()
public final void setData(java.util.Map<java.lang.String,java.lang.String> data)
IllegalSyntaxException - if name contains
an invalid character: '=', ' ', '\'', '"'public static final java.util.Map<java.lang.String,java.lang.String> parseToMap(java.util.Map<java.lang.String,java.lang.String> map,
java.lang.String rawData)
Most of characters are considered as ordinary (like 'a'), exception '"', '='
For example, the string will cause ("a12", Intger(12)),
("b+3", null), ("345", null), ("c6", "abc=125&3?5"):
a12 =12 b+3 345 c6=\t'abc=125&3?5'
IllegalSyntaxException - if syntax errospublic final java.lang.String getName()
ItemgetName in interface ItemNamespaceable.getTagName()public final void setName(java.lang.String name)
ItemsetName in interface ItemsetName in class AbstractItemNamespaceable.setTagName(java.lang.String)public final java.lang.String getText()
ItemTextual
nor Element.
For Element, the text is the concatenation of all its textual
children, including Text, CDATA, and Binary.
Besides String-type value, some item, e.g., Binary, allows any type of objects. Caller could test whether a item implements the Binable interface, and use Binable.getValue instead. For binable vertices, getText is actually getValue().toString().
The returned value is neither trimmed nor normalized.
getText in interface ItemgetText in class AbstractItempublic final void setText(java.lang.String text)
ItemsetText in interface ItemsetText in class AbstractItempublic final short getNodeType()
getNodeType in interface org.w3c.dom.Nodepublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2005-2011 Potix Corporation. All Rights Reserved.