Class XML::XMLElement

An XML element in an XML file.

Example:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.example.exampleapp" android:versionCode="1">
</manifest>

Direct supertypes

Indirect supertypes

Predicates

getAnAttribute

Gets an XML attribute of this XML element.

getAttribute

Gets the attribute with the specified name, if any.

getAttributeValue

Gets the value of the attribute with the specified name, if any.

getDepth

Gets the depth of this element within the XML file tree structure.

getElementPositionIndex

Gets the index of this XML element among its parent’s children.

getFile

Gets the XML file in which this XML element occurs.

getIndex

Gets the index of this XML element among its parent’s children.

getName

Gets the name of this XML element.

getNamespace

Gets the namespace of this XML element, if any.

getParent

Gets the parent of this XML element.

hasAttribute

Holds if this XML element has an attribute with the specified name.

hasName

Holds if this XML element has the given name.

hasNamespace

Holds if this XML element has a namespace.

toString

Gets a printable representation of this XML element.

Inherited predicates

allCharactersString

Append all the character sequences of this XML parent from left to right, separated by a space.

from XMLParent
charsSetUpTo

DEPRECATED: Internal.

from XMLParent
getACharactersSet

Gets a character sequence that is a child of this XML parent.

from XMLParent
getAChild

Gets a child element of this XML parent.

from XMLParent
getAChild

Gets a child element of this XML parent with the given name.

from XMLParent
getAComment

Gets a comment that is a child of this XML parent.

from XMLParent
getChild

Gets the child element at a specified index of this XML parent.

from XMLParent
getLocation

Gets the source location for this element.

from XMLLocatable
getNumberOfCharacterSets

Gets the number of places in the body of this XML parent where text occurs.

from XMLParent
getNumberOfChildren

Gets the number of child XML elements of this XML parent.

from XMLParent
getTextValue

Gets the text value contained in this XML parent.

from XMLParent
hasLocationInfo

Holds if this element is at the specified location. The location spans column startcolumn of line startline to column endcolumn of line endline in file filepath. For more information, see Locations.

from XMLLocatable