From: SourceForge.net <no...@so...> - 2008-02-28 14:32:03
|
Bugs item #1903923, was opened at 2008-02-28 15:26 Message generated for change (Settings changed) made by bodewig You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=1903923&group_id=23187 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None >Group: Java 1.1 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Stefan Bodewig (bodewig) >Assigned to: Stefan Bodewig (bodewig) Summary: ignoreWhitespace and CDATA don't mix well Initial Comment: as originally reported by "nobody" in bug 1863632 public void testDit() throws SAXException, IOException { String shcont = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><Data><Person><Name><![CDATA[JOE]]></Name></Person></Data>"; String newTest = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +"<Data>" +" <Person>" +" <Name>" +" <![CDATA[JOE]]>" +" </Name>" +" </Person>" +"</Data>"; XMLUnit.setIgnoreWhitespace(true); try { Diff diff = XMLUnit.compareXML(shcont, newTest); System.out.println(diff.toString()); assertTrue(diff.similar()); } finally { XMLUnit.setIgnoreWhitespace(false); } } fails ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=1903923&group_id=23187 |