Equal - Maple Help

Online Help

All Products    Maple    MapleSim


XMLTools

  

Equal

  

test whether two XML trees are equal

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

Equal(xmlTree1, xmlTree2)

Parameters

xmlTree1

-

Maple XML tree; XML element

xmlTree2

-

Maple XML tree; XML element

Description

• 

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.

Examples

withXMLTools:

xmlTree1XMLElementa,colour=red,size=10,XMLElementb,colour=blue,text:

PrintxmlTree1

<a colour = 'red' size = '10'>
  <b colour = 'blue'>text</b>
</a>

xmlTree2XMLElementa&comma;colour=red&comma;size=10&comma;XMLElementb&comma;colour=blue&comma;text&colon;

PrintxmlTree2

<a colour = 'red' size = '10'>
  <b colour = 'blue'>text</b>
</a>

xmlTree3ParseString<a colour='red' size='10'><b colour='blue'>text</b></a>&colon;

PrintxmlTree3

  <a colour = 'red' size = '10'>
    <b colour = 'blue'>text</b>
  </a>

evalbxmlTree1=xmlTree2

true

(1)

EqualxmlTree1&comma;xmlTree2

true

(2)

evalbxmlTree1=xmlTree3

false

(3)

EqualxmlTree1&comma;xmlTree3

false

(4)

See Also

XMLTools

XMLTools[Print]

XMLTools[XMLElement]