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

Online Help

All Products    Maple    MapleSim


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

XMLTools[ElementType] - return the element type of a node in an XML tree

XMLTools[ElementTypeName] - return the tag name of an element type of a node in an XML tree

XMLTools[ElementTypePrefix] - return the prefix of an element type of a node in an XML tree

XMLTools[ElementTypeURI] - return the URI of an element type of a node in an XML tree

Calling Sequence

ElementType(xmlTree)

ElementTypeName(xmlTree)

ElementTypePrefix(xmlTree)

ElementTypeURI(xmlTree)

Parameters

xmlTree

-

Maple XML tree; XML element

Description

• 

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.

Examples

withXMLTools:

evalbElementTypeXMLElementa=ElementTypeXMLElementa,xmlns=http://someurl,some text

true

(1)

evalbElementTypeXMLElementp:a,xmlns:p=http://someurl,some text=ElementTypeXMLElementp:a,xmlns:p=http://somOTHEReurl,some text

false

(2)

evalbElementNameXMLElementp:a,xmlns:p=http://someurl,some text=ElementNameXMLElementp:a,xmlns:p=http://somOTHEReurl,some text

true

(3)

ElementTypeNameXMLElementp:a,xmlns:p=http://somOTHEReurl,some text

a

(4)

ElementTypePrefixXMLElementp:a,xmlns:p=http://somOTHEReurl,some text

p

(5)

ElementTypeURIXMLElementp:a,xmlns:p=http://somOTHEReurl,some text

http://somOTHEReurl

(6)

See Also

XMLTools, XMLTools[ElementName]


Download Help Document

Was this information helpful?



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