Unit testing conditional comments

esa0

New Member
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: \[code\]<!--[if IE6]> <link type="text/css" href="http://stackoverflow.com/questions/15741042/ie6Style.css" rel="stylesheet" /><![endif]-->\[/code\]I get an error if I test it against following code (href and type attributes are swapped in following snipped):\[code\]<!--[if IE6]> <link href="http://stackoverflow.com/questions/15741042/ie6Style.css" type="text/css" rel="stylesheet" /><![endif]-->\[/code\]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?
 
Back
Top