XMLTools
ElementType
return the element type of a node in an XML tree
ElementTypeName
return the tag name of an element type of a node in an XML tree
ElementTypePrefix
return the prefix of an element type of a node in an XML tree
ElementTypeURI
return the URI of an element type of a node in an XML tree
Calling Sequence
Parameters
Description
Examples
ElementType(xmlTree)
ElementTypeName(xmlTree)
ElementTypePrefix(xmlTree)
ElementTypeURI(xmlTree)
xmlTree
-
Maple XML tree; XML element
The ElementType(xmlTree) command returns the element type of the XML element represented by the Maple XML tree xmlTree.
Unlike the string returned by XMLTools[ElementName], ElementType returns a data structure that includes full namespace information, when present, so that elements whose tag names print the same, yet belong to different namespaces, can be distinguished.
with⁡XMLTools:
evalb⁡ElementType⁡XMLElement⁡a=ElementType⁡XMLElement⁡a,xmlns=http://someurl,some text
true
evalb⁡ElementType⁡XMLElement⁡p:a,xmlns:p=http://someurl,some text=ElementType⁡XMLElement⁡p:a,xmlns:p=http://somOTHEReurl,some text
false
evalb⁡ElementName⁡XMLElement⁡p:a,xmlns:p=http://someurl,some text=ElementName⁡XMLElement⁡p:a,xmlns:p=http://somOTHEReurl,some text
ElementTypeName⁡XMLElement⁡p:a,xmlns:p=http://somOTHEReurl,some text
a
ElementTypePrefix⁡XMLElement⁡p:a,xmlns:p=http://somOTHEReurl,some text
p
ElementTypeURI⁡XMLElement⁡p:a,xmlns:p=http://somOTHEReurl,some text
http://somOTHEReurl
See Also
XMLTools[ElementName]
Download Help Document