的情況是有辦法讓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)
以不同的方式來任何想法做這個?或者一種擺脫錯誤的方法?
雖然還在,以某種方式告訴XMLUnit測試忽略的情況下將酷:) – kralco626 2012-03-29 17:05:46