Google Apps Script
Feedback on this document

Class XmlElement

An XML element. This class aids in navigating an XML hierarchy. Elements have a name, a set of attributes, and a sequence of children.

Detailed documentation

getAttribute(expandedName)

Parameters

NameTypeDescription
expandedNameStringthe 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

NameTypeDescription
namespaceNameStringthe name of the namespace to look for
localNameStringthe 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


getAttributes()

Return

XmlAttribute[] — the attributes that this element has


getElement()

Return

XmlElement — the first child element of this element (or null if there is no such element)


getElement(expandedName)

Parameters

NameTypeDescription
expandedNameStringthe 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

NameTypeDescription
namespaceNameStringthe name of the namespace to look for
localNameStringthe 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()

Return

XmlElement[] — all the child elements of this element in document order


getElements(expandedName)

Parameters

NameTypeDescription
expandedNameStringthe 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

NameTypeDescription
namespaceNameStringthe name of the namespace to look for
localNameStringthe 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


getName()

Gets the name of this XmlElement.

Return

XmlName — the name of this element


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"

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.