| Modifier and Type | Field and Description |
|---|---|
| protected transient List | additionalNamespaces
Additional namespace declarations to store on this element; useful during output |
| pack-priv AttributeList | attributes
The attributes of the element. |
| pack-priv ContentList | content
The content of the element. |
| private static final String | |
| private static final int | |
| protected String | name
The local name of the element |
| protected transient Namespace | namespace
The namespace of the element |
| Access | Constructor and Description |
|---|---|
| protected | Element()
This protected constructor is provided in order to support an Element subclass that wants full control over variable initialization. |
| public | |
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Element | Returns: this element modifiedString to addThis adds text content to this element. |
| public Element | Returns: the element on which the method was calledchild to append to end of content list child)Appends the child to the end of the element's content list. |
| public Element | Returns: the element on which the method was calledCollection of content to appendAppends all children in the given collection to the end of the content list. |
| public Element | Returns: the parent on which the method was calledlocation for adding the collection index, final Content child to insert child)Inserts the child into the content list at the given index. |
| public Element | Returns: the parent on which the method was calledlocation for adding the collection index, final Collection<E> Collection of content to insertInserts the content in a collection into the content list at the given index. |
| public void | addNamespaceDeclaration(final Namespace
namespace to add additionalNamespace)Adds a namespace declarations to this element. |
| public Object | Returns: the clone of this elementOverrides org. Implements org. This returns a deep clone of this element. |
| public List | cloneContent()
Implements org. |
| public List | Returns: a List of the additional namespace declarationsReturns a list of the additional namespace declarations on this element. |
| public Attribute | Returns: attribute for the elementname of the attribute to return name)This returns the attribute for this element with the given name and within no namespace, or null if no such attribute exists. |
| public Attribute | Returns: attribute for the elementname of the attribute to return name, final Namespace Namespace to search withinThis returns the attribute for this element with the given name and within the given Namespace, or null if no such attribute exists. |
| public List | Returns: attributes for the element
This returns the complete set of attributes for this element, as a
|
| public String | Returns: the named attribute's value, or null if no such attributename of the attribute whose value to be returned name)This returns the attribute value for the attribute with the given name and within no namespace, null if there is no such attribute, and the empty string if the attribute value is empty. |
| public String | Returns: the named attribute's value, or the default if no such attributename of the attribute whose value to be returned name, final String a default value to return if the attribute does not exist def)This returns the attribute value for the attribute with the given name and within no namespace, or the passed-in default if there is no such attribute. |
| public String | Returns: the named attribute's value, or null if no such attributename of the attribute whose valud is to be returned name, final Namespace Namespace to search withinThis returns the attribute value for the attribute with the given name and within the given Namespace, null if there is no such attribute, and the empty string if the attribute value is empty. |
| public String | Returns: the named attribute's value, or the default if no such attributename of the attribute whose valud is to be returned name, final Namespace Namespace to search withina default value to return if the attribute does not exist def)This returns the attribute value for the attribute with the given name and within the given Namespace, or the passed-in default if there is no such attribute. |
| public Element | |
| public Element | |
| public List | Returns: list of childElement objects for this elementThis returns a |
| public List | Returns: all matching child elementslocal name for the children to match name)This returns a |
| public List | Returns: all matching child elementslocal name for the children to match name, final Namespace Namespace to search withinThis returns a |
| public String | Returns: text content for the named child, or null if no such childthe name of the child name)Returns the textual content of the named child element, or null if there's no such child. |
| public String | Returns: text content for the named child, or null if no such childthe name of the child name, final Namespace the namespace of the child ns)Returns the textual content of the named child element, or null if there's no such child. |
| public String | Returns: normalized text content for the named child, or null if no such childthe name of the child name)Returns the normalized textual content of the named child element, or null if there's no such child. |
| public String | Returns: normalized text content for the named child, or null if no such childthe name of the child name, final Namespace the namespace of the child ns)Returns the normalized textual content of the named child element, or null if there's no such child. |
| public String | Returns: trimmed text content for the named child, or null if no such childthe name of the child name)Returns the trimmed textual content of the named child element, or null if there's no such child. |
| public String | Returns: trimmed text content for the named child, or null if no such childthe name of the child name, final Namespace the namespace of the child ns)Returns the trimmed textual content of the named child element, or null if there's no such child. |
| public List | Returns: aList containing the mixed content of the
element: may contain Text,
, ,
,
, and
objects.Implements org. Text, Element,
Comment, ProcessingInstruction,
CDATA, and EntityRef.
|
| public List | Returns: List - filtered Element contentFilter to applyImplements org. Element's content.
|
| public Content | getContent(final int
location of desired child index)Implements org. |
| public int | getContentSize()
Implements org. |
| public Iterator | Returns: an iterator to walk descendantsImplements org. |
| public Iterator | Returns: an iterator to walk descendants within a filterfilter to select which descendants to see filter)Implements org. |
| public String | Returns: local element nameReturns the (local) name of the element (without any namespace prefix). |
| public Namespace | |
| public Namespace | Returns: the Namespace for this prefix at this location, or null if nonenamespace prefix to look up prefix)Returns the |
| public String | Returns: the namespace prefixReturns the namespace prefix of the element or an empty string if none exists. |
| public String | Returns: the namespace URI for this elementReturns the namespace URI mapped to this element's prefix (or the in-scope default namespace URI if no prefix). |
| public String | Returns: qualified name of the element (including namespace prefix)Returns the full name of the element, in the form [namespacePrefix]:[localName]. |
| public String | Returns: text content for this element, or empty string if noneReturns the textual content directly held under this element as a string. |
| public String | Returns: normalized text content for this element, or empty string if noneReturns the textual content of this element with all surrounding whitespace removed and internal whitespace normalized to a single space. |
| public String | Returns: trimmed text content for this element, or empty string if noneReturns the textual content of this element with all surrounding whitespace removed. |
| public String | Returns: a concatentation of all text node descendantsImplements abstract org. |
| public int | indexOf(final Content
child to search for child)Implements org. |
| public boolean | Returns: true if this element is the ancestor of the
supplied elementElement to check againstDetermines if this element is the ancestor of another element. |
| public boolean | Returns: whether this is a root elementReturns whether this element is a root element. |
| private void | |
| public boolean | Returns: whether the attribute was removedname of attribute to remove name)This removes the attribute with the given name and within no namespace. |
| public boolean | Returns: whether the attribute was removedname of attribute to remove name, final Namespace namespace URI of attribute to remove ns)This removes the attribute with the given name and within the given Namespace. |
| public boolean | Returns: whether the attribute was removedReference to the attribute to be removed. attribute)This removes the supplied Attribute should it exist. |
| public boolean | Returns: whether deletion occurredthe name of child elements to remove name)This removes the first child element (one level deep) with the given local name and belonging to no namespace. |
| public boolean | Returns: whether deletion occurredthe name of child element to remove name, final Namespace Namespace to search withinThis removes the first child element (one level deep) with the given local name and belonging to the given namespace. |
| public boolean | Returns: whether deletion occurredthe name of child elements to remove name)This removes all child elements (one level deep) with the given local name and belonging to no namespace. |
| public boolean | Returns: whether deletion occurredthe name of child elements to remove name, final Namespace Namespace to search withinThis removes all child elements (one level deep) with the given local name and belonging to the given namespace. |
| public List | Returns: list of the old children detached from this parentImplements org. |
| public List | Returns: list of the old children detached from this parentfilter to select which content to remove filter)Implements org. |
| public boolean | removeContent(final Content
child to remove child)Implements org. |
| public Content | removeContent(final int
index of child to remove index)Implements org. |
| public void | removeNamespaceDeclaration(final Namespace
namespace to remove additionalNamespace)Removes an additional namespace declarations from this element. |
| public Element | Returns: this element modifiedname of the attribute to set name, final String value of the attribute to set value)This sets an attribute value for this element. |
| public Element | Returns: this element modifiedname of the attribute to set name, final String value of the attribute to set value, final Namespace namespace of the attribute to set ns)This sets an attribute value for this element. |
| public Element | Returns: this element modifiedAttribute to setThis sets an attribute value for this element. |
| public Element | Returns: this element modifiedCollection of attributes to setThis sets the attributes of the element. |
| public Element | |
| public Element | Returns: this element modifiedCollection of content to setThis sets the content of the element. |
| public Element | Returns: element on which this method was invoked- index of child to replace. index, final Content - child to add. child)Replace the current child the given index with the supplied child. |
| public Parent | Returns: object on which this method was invoked- index of child to replace. index, final Collection<E> - newContent)Collection of content to replace child.Replace the child at the given index whith the supplied collection. |
| public Element | Returns: the parent on which the method was callednew content to replace existing content child)Set this element's content to be the supplied child. |
| public Element | |
| public Element | Returns: the target elementthe new namespace namespace)Sets the element's |
| public Element | |
| public String | Returns: String - information about the
ElementOverrides java.
This returns a |
| private void |