java - Unit testing conditional comments -
i'm using xmlunit (org.custommonkey.xmlunit.diff) test 2 html strings: 1 produced templating engine, other static file. works fine, ran following problem:
there conditional comments in code, this:
<!--[if ie6]> <link type="text/css" href="ie6style.css" rel="stylesheet" /> <![endif]-->
i error if test against following code (href , type attributes swapped in following snipped):
<!--[if ie6]> <link href="ie6style.css" type="text/css" rel="stylesheet" /> <![endif]-->
i know xml parser, conditional comment plain text. there way how test conditional comment content html/xml code?
in case want ignore comments, there xmlunit.setignorecomments(false)
Comments
Post a Comment