Java org.dom4j Element fields, constructors, methods, implement or subclass

Example usage for Java org.dom4j Element fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.dom4j Element.

The text is from its open source code.

Implementation

org.dom4j.Element has the following implementations.
Click this link to see all its implementation.

Method

voidadd(Attribute attribute)
Adds the given Attribute to this element.
voidadd(CDATA cdata)
Adds the given CDATA to this element.
voidadd(Entity entity)
Adds the given Entity to this element.
voidadd(Text text)
Adds the given Text to this element.
voidadd(Namespace namespace)
Adds the given Namespace to this element.
ElementaddAttribute(String name, String value)
Adds the attribute value of the given local name.
ElementaddAttribute(QName qName, String value)
Adds the attribute value of the given fully qualified name.
ElementaddCDATA(String cdata)
Adds a new CDATA node with the given text to this element.
ElementaddComment(String comment)
Adds a new Comment node with the given text to this element.
ElementaddElement(String name)
Adds a new Element node with the given name to this branch and returns a reference to the new node.
ElementaddElement(String qualifiedName, String namespaceURI)
Adds a new Element node with the given qualified name and namespace URI to this branch and returns a reference to the new node.
ElementaddEntity(String name, String text)
Adds a new Entity node with the given name and text to this element and returns a reference to the new node.
ListadditionalNamespaces()
Returns any additional namespaces declarations for this element other than namespace returned via the #getNamespace() method.
ElementaddNamespace(String prefix, String uri)
Adds a namespace to this element for use by its child content
ElementaddText(String text)
Adds a new Text node with the given text to this element.
voidappendAttributes(Element element)
Appends the attributes of the given element to me.
voidappendContent(Branch branch)
Appends the content of the given branch to this branch instance.
Attributeattribute(int index)
Returns the attribute at the specified indexGets the
Attributeattribute(String name)
Returns the attribute with the given name
Attributeattribute(QName qName)
DOCUMENT ME!
intattributeCount()
DOCUMENT ME!
IteratorattributeIterator()
DOCUMENT ME!
Listattributes()
Returns the Attribute instances this element contains as a backed List so that the attributes may be modified directly using the List interface.
StringattributeValue(String name)
This returns the attribute value for the attribute with the given name and any namespace or null if there is no such attribute or the empty string if the attribute value is empty.
StringattributeValue(QName qName)
This returns the attribute value for the attribute with the given fully qualified name or null if there is no such attribute or the empty string if the attribute value is empty.
StringattributeValue(String name, String defaultValue)
This returns the attribute value for the attribute with the given name and any namespace or the default value if there is no such attribute value.
StringattributeValue(QName qName, String defaultValue)
This returns the attribute value for the attribute with the given fully qualified name or the default value if there is no such attribute value.
voidclearContent()
Clears the content for this branch, removing any Node instances this branch may contain.
Listcontent()
Returns the content nodes of this branch as a backed List so that the content of this branch may be modified directly using the List interface.
ElementcreateCopy()
Creates a deep copy of this element The new element is detached from its parent, and getParent() on the clone will return null.
ElementcreateCopy(String name)
Creates a deep copy of this element with the given local name The new element is detached from its parent, and getParent() on the clone will return null.
ElementcreateCopy(QName qName)
Creates a deep copy of this element with the given fully qualified name.
ListdeclaredNamespaces()
Returns all the namespaces declared by this element.
ElementelementByID(String elementID)
Returns the element of the given ID attribute value.
IteratorelementIterator()
Returns an iterator over all this elements child elements.
IteratorelementIterator(String name)
Returns an iterator over the elements contained in this element which match the given local name and any namespace.
IteratorelementIterator(QName qName)
Returns an iterator over the elements contained in this element which match the given fully qualified name.
Listelements()
Returns the elements contained in this element.
Listelements(String name)
Returns the elements contained in this element with the given local name and any namespace.
Listelements(QName qName)
Returns the elements contained in this element with the given fully qualified name.
StringelementText(String name)
StringelementText(QName qname)
StringelementTextTrim(String name)
StringelementTextTrim(QName qname)
ObjectgetData()
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 #getText
NamespacegetNamespace()
Returns the Namespace of this element if one exists otherwise Namespace.NO_NAMESPACE is returned.
NamespacegetNamespaceForPrefix(String prefix)
Returns the Namespace which is mapped to the given prefix or null if it could not be found.
NamespacegetNamespaceForURI(String uri)
Returns the Namespace which is mapped to the given URI or null if it could not be found.
StringgetNamespacePrefix()
Returns the namespace prefix of this element if one exists otherwise an empty String is returned.
StringgetNamespaceURI()
Returns the URI mapped to the namespace of this element if one exists otherwise an empty String is returned.
QNamegetQName()
Returns the QName of this element which represents the local name, the qualified name and the Namespace.
StringgetQualifiedName()
Returns the fully qualified name of this element.
StringgetStringValue()
Returns the XPath string-value of this node.
StringgetText()
Returns the text value of this element without recursing through child elements.
StringgetTextTrim()
DOCUMENT ME!
booleanhasMixedContent()
Returns true if this Element has mixed content.
intindexOf(Node node)
Returns the index of the given node if it is a child node of this branch or -1 if the given node is not a child node.
booleanisRootElement()
DOCUMENT ME!
booleanisTextOnly()
Returns true if this Element has text only content.
Nodenode(int index)
Returns the Node at the specified index position.
intnodeCount()
Returns the number of Node instances that this branch contains.
IteratornodeIterator()
Returns an iterator through the content nodes of this branch
voidnormalize()
Puts all Text nodes in the full depth of the sub-tree underneath this Node, including attribute nodes, into a "normal" form where only structure (e.g., elements, comments, processing instructions, CDATA sections, and entity references) separates Text nodes, i.e., there are neither adjacent Text nodes nor empty Text nodes.
booleanremove(Attribute attribute)
Removes the given Attribute from this element.
booleanremove(CDATA cdata)
Removes the given CDATA if the node is an immediate child of this element.
booleanremove(Entity entity)
Removes the given Entity if the node is an immediate child of this element.
booleanremove(Namespace namespace)
Removes the given Namespace if the node is an immediate child of this element.
booleanremove(Text text)
Removes the given Text if the node is an immediate child of this element.
voidsetAttributes(List attributes)
Sets the attributes that this element contains
voidsetAttributeValue(String name, String value)
Sets the attribute value of the given local name.
voidsetAttributeValue(QName qName, String value)
Sets the attribute value of the given fully qualified name.
voidsetContent(List content)
Sets the contents of this branch as a List of Node instances.
voidsetData(Object data)
Sets the data value of this element if this element supports data binding or calls #setText if it doesn't
voidsetQName(QName qname)
Sets the QName of this element which represents the local name, the qualified name and the Namespace.