ElementName - Maple Help

XMLTools

 ElementName
 return the element tag name of a node in an XML tree

 Calling Sequence ElementName(xmlTree)

Parameters

 xmlTree - Maple XML tree; XML element

Description

 • The ElementName(xmlTree) command returns the element tag name of the XML element represented by the Maple XML tree xmlTree.
 • The element tag name is returned as a string, including any namespace prefix, if present. To distinguish between elements whose element types belong to different namespaces, yet print the same, use the XMLTools[ElementType] command.

Examples

 > $\mathrm{with}\left(\mathrm{XMLTools}\right):$
 > $\mathrm{ElementName}\left(\mathrm{XMLElement}\left("a"\right)\right)$
 ${"a"}$ (1)
 > $\mathrm{ElementName}\left(\mathrm{XMLElement}\left("a",\left["xmlns"="http://someurl"\right],"some text"\right)\right)$
 ${"a"}$ (2)
 > $\mathrm{ElementName}\left(\mathrm{XMLElement}\left("p:a",\left["xmlns:p"="http://someurl"\right],"some text"\right)\right)$
 ${"p:a"}$ (3)