Migrate from GitHub to SourceForge with this tool. Check out all of SourceForge's recent improvements.
Close

#24 CDATA sections compare unequal

closed-fixed
nobody
None
5
2006-12-13
2005-08-17
No

This test fails:

public void testCDATA()
throws SAXException, IOException,
ParserConfigurationException {

String expected = "<a>Hello</a>";
String actual = "<a><![CDATA[Hello]]></a>";
assertXMLEqual(expected, actual);

}

There's no justification for that. It should pass. That
the test fails is an artifact of a design flaw in DOM
(Text and CDATASection nodes are distinguished.)
There's no reason to echo that here. We're comparing
XML, not DOM. The use of DOM is an implementation detail.

Discussion

  • Stefan Bodewig

    Stefan Bodewig - 2006-12-13
    • status: open --> closed-fixed
     
  • Stefan Bodewig

    Stefan Bodewig - 2006-12-13

    Logged In: YES
    user_id=113148
    Originator: NO

    I agree, fixed in CVS.

     

Log in to post a comment.