XMLTools - Maple Help

Online Help

All Products    Maple    MapleSim


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

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&equals;red&comma;size&equals;10&comma;XMLElementb&comma;colour&equals;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&equals;xmlTree2

true

(1)

EqualxmlTree1&comma;xmlTree2

true

(2)

evalbxmlTree1&equals;xmlTree3

false

(3)

EqualxmlTree1&comma;xmlTree3

false

(4)

See Also

XMLTools

XMLTools[Print]

XMLTools[XMLElement]

 


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