org.dom4j.util
Class UserDataAttribute
java.lang.Object
org.dom4j.tree.AbstractNode
org.dom4j.tree.AbstractAttribute
org.dom4j.tree.FlyweightAttribute
org.dom4j.tree.DefaultAttribute
org.dom4j.util.UserDataAttribute
- Attribute, Cloneable, Node, Serializable
public class UserDataAttribute
extends org.dom4j.tree.DefaultAttribute
UserDataAttribute
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.
ANY_NODE , ATTRIBUTE_NODE , CDATA_SECTION_NODE , COMMENT_NODE , DOCUMENT_NODE , DOCUMENT_TYPE_NODE , ELEMENT_NODE , ENTITY_REFERENCE_NODE , MAX_NODE_TYPE , NAMESPACE_NODE , PROCESSING_INSTRUCTION_NODE , TEXT_NODE , UNKNOWN_NODE |
Object | getData() -
Accesses the data of this attribute which may implement data typing
bindings such as
XML Schema or Java Bean
bindings or will return the same value as Node.getText() .
|
void | setData(Object data) -
Sets the data value of this attribute if this element supports data
binding or calls
Node.setText(String) if it doesn't.
|
accept , asXML , createXPathResult , getData , getName , getNamespace , getNamespacePrefix , getNamespaceURI , getNodeType , getPath , getQualifiedName , getText , getUniquePath , setData , setNamespace , setText , setValue , toString , write |
asXPathResult , clone , createPattern , createXPath , createXPathFilter , createXPathResult , detach , getDocument , getDocumentFactory , getName , getNodeType , getNodeTypeName , getParent , getPath , getStringValue , getText , getUniquePath , hasContent , isReadOnly , matches , numberValueOf , selectNodes , selectNodes , selectNodes , selectObject , selectSingleNode , setDocument , setName , setParent , setText , supportsParent , valueOf , write |
UserDataAttribute
public UserDataAttribute(QName qname)
UserDataAttribute
public UserDataAttribute(QName qname,
String text)
getData
public Object getData()
Accesses the data of this attribute which may implement data typing
bindings such as
XML Schema
or
Java Bean
bindings or will return the same value as
Node.getText()
.
- getData in interface Attribute
- getData in interface org.dom4j.tree.AbstractAttribute
setData
public void setData(Object data)
Sets the data value of this attribute if this element supports data
binding or calls
Node.setText(String)
if it doesn't.
- setData in interface Attribute
- setData in interface org.dom4j.tree.AbstractAttribute
data
- the attribute data
Copyright B) 2005 MetaStuff Ltd. All Rights Reserved. Hosted by 