return the element tag name of a node in an XML tree - Maple Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : Connectivity : Web Features : XMLTools : XMLTools/ElementName

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)
 See Also

## Was this information helpful?

 Please add your Comment (Optional) E-mail Address (Optional) What is ? This question helps us to combat spam