An XML element. This class aids in navigating an XML hierarchy. Elements have a name, a set of attributes, and a sequence of children.
Methods
Detailed documentation
getAttribute(expandedName)
Parameters
Name | Type | Description |
---|---|---|
expandedName | String | the expanded name to look for |
Return
XmlAttribute
— the attribute with the provided expanded name (or null
if
there is no such child
getAttribute(namespaceName, localName)
Parameters
Name | Type | Description |
---|---|---|
namespaceName | String | the name of the namespace to look for |
localName | String | the local name to look for |
Return
XmlAttribute
— the attribute with the provided namespace name and local name (or
null
if there is no such child
getElement()
Return
XmlElement
— the first child element of this element (or null
if there
is no such element)
getElement(expandedName)
Parameters
Name | Type | Description |
---|---|---|
expandedName | String | the expanded name to look for |
Return
XmlElement
— this first child element of this element with the provided expanded
name, or null
if there is no such element
getElement(namespaceName, localName)
Parameters
Name | Type | Description |
---|---|---|
namespaceName | String | the name of the namespace to look for |
localName | String | the local name to look for |
Return
XmlElement
— this first child element of this element with the provided
namespace name and local name, or null
if there is no such
element
getElements(expandedName)
Parameters
Name | Type | Description |
---|---|---|
expandedName | String | the expanded name to look for |
Return
XmlElement[]
— all the child elements of this element, with the provided expanded
name, in document order
getElements(namespaceName, localName)
Parameters
Name | Type | Description |
---|---|---|
namespaceName | String | the name of the namespace to look for |
localName | String | the local name to look for |
Return
XmlElement[]
— all the child elements of this element, with the provided namespace
name and local name, in document order
toXmlString()
Return
String
— this node in string form. For Elements and Documents this will be
the fully converted node in XML string form. For other minor nodes
(like Attributes) this will be in simplified XML fragments like:
foo="bar"