fix xml bug

This commit is contained in:
Looly 2020-04-09 17:46:12 +08:00
parent ced42166d3
commit 9b470616ba
2 changed files with 2 additions and 1 deletions

View File

@ -27,6 +27,7 @@
* 【http 】 修复HttpUtil.encodeParams针对无参数URL问题issue#817@Github
* 【extra 】 修复模板中无效引用的问题
* 【extra 】 修复读取JSON文本配置未应用到子对象的问题issue#818@Github
* 【extra 】 修复XmlUtil.createXml中namespace反向问题
-------------------------------------------------------------------------------------------------------------

View File

@ -513,7 +513,7 @@ public class XmlUtil {
*/
public static Document createXml(String rootElementName, String namespace) {
final Document doc = createXml();
doc.appendChild(null == namespace ? doc.createElement(rootElementName) : doc.createElementNS(rootElementName, namespace));
doc.appendChild(null == namespace ? doc.createElement(rootElementName) : doc.createElementNS(namespace, rootElementName));
return doc;
}