I'm using XMLUnit (org.custommonkey.xmlunit.Diff) to test two HTML strings: one is produced by templating engine, other is from a static file. It works fine, but I ran to following problem:
There are conditional comments in my code, like this:
<!--[if IE6]>
<link type="text/css" href="ie6Style.css" rel="stylesheet" />
<![endif]-->
I get an error if I test it against following code (href and type attributes are swapped in following snipped):
<!--[if IE6]>
<link href="ie6Style.css" type="text/css" rel="stylesheet" />
<![endif]-->
I know that for XML parser, the conditional comment is just a plain text. But is there a way how to test conditional comment content a HTML/XML code?