1
Junit 테스트 중 하나에서 XML 두 개를 비교하고 싶습니다. xml 비교를 위해 XMLUnit을 사용하고 있습니다. xml에서 correlation-id
의 비교를 무시할 수있는 쉬운 방법이 있는지 알려주십시오.XML을 컴파일하는 동안 특정 요소를 무시하십시오. XMLUnit
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>
당신도의 샘플을 추가시겠습니까 당신의 암호? –