On 2014-05-09, Gordon Ross wrote:
> My code is:
> public void testXmlTest1() throws SAXException, IOException
> {
> String source = "<stuff-doc><stuff>Stuff Stuff
> Stuff</stuff><more-stuff>Some More Stuff</more-stuff></stuff-doc>";
> String test = "<stuff-doc>\n<stuff>Stuff Stuff
> Stuff</stuff>\n<more-stuff>Some More Stuff</more-stuff>\n</stuff-doc>";
> assertXMLEqual(source, test);
> }
> XMLUnit is saying they are not the same as the number of children of
> <stuff-doc> is 5, not 2. Well, that’s true because of the whitespace
> creating text nodes. But I thought XMLUnit was supposed to cope with
> this?
If you tell it to :-)
<http://xmlunit.sourceforge.net/userguide/html/ar01s02.html#Basic:%20Element%20Content%20Whitespace>
<http://xmlunit.sourceforge.net/userguide/html/ar01s03.html#Whitespace%20Handling>
Stefan
------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Xmlunit-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xmlunit-general