public class UserDataElement
extends org.dom4j.tree.DefaultElement
UserDataElement
support the adornment of a user data object on
an Element or Attribute instance such that the methods
setData(Object)
will get and set the values of a user data object.
This can be useful for developers wishing to create XML trees and adorn the
trees with user defined objects.
构造器和说明 |
---|
UserDataElement(QName qname) |
UserDataElement(String name) |
限定符和类型 | 方法和说明 |
---|---|
Object |
clone()
clone will return a deep clone or if this node is
read-only then clone will return the same instance. |
protected Element |
createElement(QName qName) |
protected Element |
createElement(String name) |
protected Object |
getCopyOfUserData()
If a deep copy of user data is required whenever the clone() or
createCopy() methods are called on this element then this method should
return a clone of the user data
|
Object |
getData()
Accesses the data of this element which may implement data typing
bindings such as XML Schema or Java Bean bindings or will return the same
value as
Element.getText() |
void |
setData(Object data)
Sets the data value of this element if this element supports data binding
or calls
Node.setText(java.lang.String) if it doesn't |
String |
toString() |
add, additionalNamespaces, additionalNamespaces, addNewNode, attribute, attribute, attribute, attribute, attributeCount, attributeIterator, attributeList, attributeList, attributes, clearContent, contentList, declaredNamespaces, element, element, element, getDocument, getDocumentFactory, getNamespaceForPrefix, getNamespaceForURI, getParent, getQName, getStringValue, getText, indexOf, node, nodeCount, nodeIterator, processingInstruction, processingInstructions, processingInstructions, remove, removeNode, removeProcessingInstruction, setAttributeList, setAttributes, setContent, setDocument, setParent, setQName, supportsParent
accept, add, add, add, add, add, add, add, add, addAttribute, addAttribute, addCDATA, addComment, addElement, addEntity, addNamespace, addNewNode, addNode, addNode, addProcessingInstruction, addProcessingInstruction, addText, appendAttributes, asXML, attributeValue, attributeValue, attributeValue, attributeValue, childAdded, childRemoved, createAttributeList, createAttributeList, createCopy, createCopy, createCopy, createSingleIterator, elementIterator, elementIterator, elementIterator, elementIterator, elements, elements, elements, elements, elementText, elementText, elementTextTrim, elementTextTrim, ensureAttributesCapacity, getName, getNamespace, getNamespacePrefix, getNamespacesForURI, getNamespaceURI, getNodeType, getPath, getQName, getQualifiedName, getUniquePath, getXPathNameStep, getXPathResult, hasMixedContent, isRootElement, isTextOnly, normalize, remove, remove, remove, remove, remove, remove, remove, remove, setAttributes, setAttributeValue, setAttributeValue, setName, setNamespace, setText, write
addElement, addElement, addElement, appendContent, content, contentRemoved, createContentList, createContentList, createEmptyList, createResultList, createSingleResultList, elementByID, elementID, getContentAsStringValue, getContentAsText, getTextTrim, hasContent, invalidNodeTypeAddException, isReadOnly, setProcessingInstructions
asXPathResult, createPattern, createXPath, createXPathFilter, createXPathResult, detach, getNodeTypeName, getPath, getUniquePath, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, valueOf
getTextTrim
addElement, addElement, appendContent, content, elementByID, setProcessingInstructions
asXPathResult, createXPath, detach, getNodeTypeName, getPath, getUniquePath, hasContent, isReadOnly, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, valueOf
public UserDataElement(String name)
public UserDataElement(QName qname)
public Object getData()
Element
Element.getText()
public void setData(Object data)
Element
Node.setText(java.lang.String)
if it doesn'tpublic String toString()
toString
在类中 org.dom4j.tree.AbstractElement
public Object clone()
Node
clone
will return a deep clone or if this node is
read-only then clone will return the same instance.
protected Object getCopyOfUserData()
protected Element createElement(String name)
createElement
在类中 org.dom4j.tree.AbstractElement
Copyright © 2005 MetaStuff Ltd. All Rights Reserved. Hosted by