xmlunit을 사용하여 두 텍스트 파일을 비교하고 있습니다. 제어 XML이다 : 나는 및 요소 교체가 XML의 다른 부분에 대해이 비교하고XmlUnit 및 하위 노드
<books>
<book>
<name>Angels & Demons</name>
<isbn>9971-5-0210-0</isbn>
<author>Dan Brown</author>
<category></category>
</book>
</books>
.
<books>
<book>
<isbn>9971-5-0210-0</isbn>
<name>Angels & Demons</name>
<author>Dan Brown</author>
<category></category>
</book>
</books>
은 diff 객체는 다음과 같은 차이를보고합니다
Expected sequence of child nodes '1' but was '3' - comparing <name...> at /books[1]/book[1]/name[1] to <name...> at /books[1]/book[1]/name[1]
<name>
경우는 자식 노드 인을 '1', <isbn>
가 자식 노드를하지 않을 것 '2'?
. \t \t ** XMLUnit.setIgnoreWhitespace (true); ** 자식 노드의 예상 시퀀스 '0'을 사용했지만 '1'이었습니다./struct [1]/int [1]에서을 비교했습니다./struct [1]/int [1]'에있는 까지 –
timmy