XMLTools
Equal
test whether two XML trees are equal
Calling Sequence
Parameters
Description
Examples
Equal(xmlTree1, xmlTree2)
xmlTree1
-
Maple XML tree; XML element
xmlTree2
The Equal(xmlTree1, xmlTree2) command test whether two XML trees are the same.
The arguments must be correctly formed XML tree data structures. One of the values true and false is returned.
with⁡XMLTools:
xmlTree1≔XMLElement⁡a,colour=red,size=10,XMLElement⁡b,colour=blue,text:
Print⁡xmlTree1
<a colour = 'red' size = '10'> <b colour = 'blue'>text</b> </a>
xmlTree2≔XMLElement⁡a,colour=red,size=10,XMLElement⁡b,colour=blue,text:
Print⁡xmlTree2
xmlTree3≔ParseString⁡<a colour='red' size='10'><b colour='blue'>text</b></a>:
Print⁡xmlTree3
evalb⁡xmlTree1=xmlTree2
true
Equal⁡xmlTree1,xmlTree2
evalb⁡xmlTree1=xmlTree3
false
Equal⁡xmlTree1,xmlTree3
See Also
XMLTools[Print]
XMLTools[XMLElement]
Download Help Document