|
From: Arjan K. <arj...@gm...> - 2013-05-18 20:05:33
|
Hi,
The following test fails.
@Test
public void testCommentOutsideRoot() throws Exception {
String myControlXML = "<?xml version=\"1.0\"
encoding=\"utf-8\"?><xs:schema id=\"kvk_rpt-kvk-g\" xmlns:xs=\"
http://www.w3.org/2001/XMLSchema\"></xs:schema>";
String myTestXML = "<?xml version=\"1.0\" encoding=\"utf-8\"?>*<!--
Release .. -->*<xs:schema id=\"kvk_rpt-kvk-g\" xmlns:xs=\"
http://www.w3.org/2001/XMLSchema\"></xs:schema>";
assertXMLNotEqual("Comparing test xml to control xml",
myControlXML, myTestXML);
}
However, the xml (which is valid) is clearly different. Apparently,
comments outside the root element are ignored. Is there a way to prevent
this? I am using java 1.7, xmlunit version 1.4.
Thanks & Regards,
Arjan Kok.
|