in reply to Re^6: Comparison of XML files ignoring ordering of child elements
in thread Comparison of XML files ignoring ordering of child elements

Entity: line 1: parser error : ParsePI: PI xm space expected <?xm="UTF-8"?> ^
Please suggest me what can be wrong in the script.

From the error message it seems pretty clear to me that your input file is malformed. A typical first line of an XML file would be <?xml version="1.0" encoding="UTF-8"?>.