---
title: "must end with the ';' delimiter.错误的解决"
author: "minfirefox"
date: "2008-11-19T15:24:44Z"
tags: []
slug: "must-end-with-the-delimiter"
draft: false
lastmod: "2008-11-20T10:28:51Z"
id: 270461
url: "https://minfirefox.iteye.com/blog/270461"
---

在配置文件中直接用&的话，会产生must end with the ';' delimiter.错误。


```xml

<action name="add" method="add" class="com.entity.NodeAction">
	<result type="redirect">edit.action?id=${id}&next=${next}</result>
</action>
```


```xml

<property name="connection.url">
	jdbc:mysql://localhost:3306/my?useUnicode=true&characterEncoding=utf-8
</property>

```



正确的做法是：<span style="color:red">把**&**换成**&amp;**</span>

```xml

<action name="add" method="add" class="com.entity.NodeAction">
	<result type="redirect">edit.action?id=${id}&amp;next=${next}</result>
</action>

```


```xml

<property name="connection.url">
	jdbc:mysql://localhost:3306/my?useUnicode=true&amp;characterEncoding=utf-8
</property>

```





XML其他字符的转换：
<span style="color:red">
**<** 换成 **&lt;**
**>** 换成 **&gt;**
**'** 换成 **&apos;**
**"** 换成 **&quot;**
</span>