'Verifies that the given ``source`` element is equal to ``expected``.
Both ``source`` and ``expected`` can be given as a path to an XML file,
as a string containing XML, or as an already parsed XML element
structure. See `introduction` for more information about parsing XML in
general.
The keyword passes if the ``source`` element and ``expected`` element
are equal. This includes testing the tag names, texts, and attributes
of the elements. By default also child elements are verified the same
way, but this can be disabled by setting ``exclude_children`` to a
true value (see `Boolean arguments`).
All texts inside the given elements are verified, but possible text
outside them is not. By default texts must match exactly, but setting
``normalize_whitespace`` to a true value makes text verification
independent on newlines, tabs, and the amount of spaces. For more
details about handling text see `Get Element Text` keyword and
discussion about elements\' `text` and `tail` attributes in the
`introduction`.
Examples using ``${XML}`` structure from `Example`:
| ${first} =               | Get Element | ${XML} | first             |
| Elements Should Be Equal | ${first}    | <first id="1">text</first> |
| ${p} =                   | Get Element | ${XML} | html/p            |
| Elements Should Be Equal | ${p} | <p>Text with <b>bold</b> and <i>italics</i>.</p> | normalize_whitespace=yes |
| Elements Should Be Equal | ${p} | <p>Text with</p> | exclude | normalize |
The last example may look a bit strange because the ``<p>`` element only
has text ``Text with``. The reason is that rest of the text inside
``<p>`` actually belongs to the child elements.
See also `Elements Should Match`.'

def elements_should_be_equal(self, source, expected, exclude_children=False, normalize_whitespace=False):

    self._compare_elements(source, expected, should_be_equal, exclude_children, normalize_whitespace)
