2012-03-29 99 views
2

的情况是有办法让XML单位忽略大小写比较两个XML文档时?标签和它们的价值......对我来说都是一样的吗?忽略与XMLUnit测试

XMLUnit测试给我以下区别:Expected attribute value 'FALSE' but was 'false'

我试图简单地在两个输入字符串使用.toUpperCase()但后来我得到这个错误:

[Fatal Error] :1:6: The processing instruction target matching "[xX][mM][lL]" is not allowed. org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed. at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) at org.custommonkey.xmlunit.XMLUnit.buildDocument(XMLUnit.java:383) at org.custommonkey.xmlunit.XMLUnit.buildDocument(XMLUnit.java:370) at org.custommonkey.xmlunit.Diff.<init>(Diff.java:101) at org.custommonkey.xmlunit.Diff.<init>(Diff.java:93)

以不同的方式来任何想法做这个?或者一种摆脱错误的方法?

回答

0

所以,如果我用.toLowerCase()它的工作原理......事做的文档类型以大写字母是导致类似的问题或东西...

+0

虽然还在,以某种方式告诉XMLUnit测试忽略的情况下将酷:) – kralco626 2012-03-29 17:05:46