1
特殊字符我運行此查詢在下面的XML文件:逃避XML
<?xml version="1.0" encoding="UTF-8"?>
..
...
<query>
update tableX set colName='$ClassService.getParameter(\"param1\")$' where id = '0'
</query>
...
我收到以下錯誤:
ERROR]: Exception occurred, terminating. java.lang.IllegalArgumentException: Exception parsing or evaluating ClassService.getParameter(\"param1\")
如何逃脫「正確
有沒有必要逃避'「'在XML字符,除非你在屬性中找到他們,我認爲你可以直接寫'ClassService.getParameter(」參數1 「)' – potame
那麼我得到了相同的錯誤 – Ronald
所以我想你的問題不在於XML轉義。你的XML被評估和使用在其他地方,並引發異常。也許你可以發送完整的堆棧跟蹤? – potame