|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zkoss.idom.impl.AbstractItem
org.zkoss.idom.ProcessingInstruction
public class ProcessingInstruction
The iDOM processing instruction.
| Field Summary | |
|---|---|
protected String |
_rawData
The raw data. |
protected String |
_target
The target. |
| Fields inherited from interface org.zkoss.idom.Item |
|---|
FIND_BY_PREFIX, FIND_BY_REGEX, FIND_BY_TAGNAME, FIND_IGNORE_CASE, FIND_RECURSIVE |
| Constructor Summary | |
|---|---|
protected |
ProcessingInstruction()
Constructor. |
|
ProcessingInstruction(String target,
Map data)
Constructor. |
|
ProcessingInstruction(String target,
String data)
Constructor. |
| Method Summary | |
|---|---|
String |
getData()
|
String |
getName()
Gets the name of the item. |
short |
getNodeType()
|
String |
getTarget()
|
String |
getText()
Gets the text of this item, or null if it is neither Textual
nor Element. |
Map |
parseData()
Returns the parsed data in the form of Map (never null). |
static Map |
parseToMap(Map map,
String rawData)
Parses the raw data into a map. |
void |
setData(Map data)
Sets the raw data with a data map. |
void |
setData(String data)
|
void |
setName(String name)
Sets the name of the item. |
void |
setTarget(String target)
|
void |
setText(String text)
Sets the text of this item. |
String |
toString()
|
| Methods inherited from class org.zkoss.idom.impl.AbstractItem |
|---|
appendChild, clearModified, clone, 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, isModified, isReadonly, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, match, normalize, removeChild, replaceChild, setLocator, setModified, setNodeValue, setParent, setPrefix, setReadonly, setTextContent, setUserData |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.w3c.dom.Node |
|---|
appendChild, 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, setUserData |
| Field Detail |
|---|
protected String _target
protected String _rawData
| Constructor Detail |
|---|
public ProcessingInstruction(String target,
String data)
public ProcessingInstruction(String target,
Map data)
protected ProcessingInstruction()
| Method Detail |
|---|
public final String getTarget()
getTarget in interface ProcessingInstructionpublic final void setTarget(String target)
public final String getData()
getData in interface ProcessingInstructionpublic final void setData(String data)
setData in interface ProcessingInstructionpublic final Map parseData()
public final void setData(Map data)
IllegalSyntaxException - if name contains
an invalid character: '=', ' ', '\'', '"'
public static final Map parseToMap(Map map,
String rawData)
Most of characters are considered as ordinary (like 'a'), exception '"', '='
Example, the string wil 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 String getName()
Item
getName in interface ItemNamespaceable.getTagName()public final void setName(String name)
Item
setName in interface ItemsetName in class AbstractItemNamespaceable.setTagName(java.lang.String)public final String getText()
ItemTextual
nor Element.
For Element, the text is the catenation 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(String text)
Item
setText in interface ItemsetText in class AbstractItempublic final short getNodeType()
getNodeType in interface Nodepublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||