I want to compare two XML in one of the Junit test.
I am using XMLUnit for comparison of xml.Can you please tell me if there is any easy way to ignore comparison of correlation-id
in the xmls.
XML1:
<?xml version="1.0" encoding="UTF-8"?>
<response>
<bih-metadata>
<result>Error</result>
<correlation-id>ID:925977d0-83cd-11e6-b94d-c135e6c73218</correlation-id>
<error-message>SAXParseException: The entity name must immediately follow the '&' in the entity reference.</error-message>
</bih-metadata>
</response>
XML2:
<?xml version="1.0" encoding="UTF-8"?>
<response>
<bih-metadata>
<result>Error</result>
<correlation-id>ID:134345d0-83cd-11e6-b94d-c135e6c73218</correlation-id>
<error-message>SAXParseException: The entity name must immediately follow the '&' in the entity reference.</error-message>
</bih-metadata>
</response>