日期:2014-05-17  浏览次数:20722 次

<ns:return> <name xmlns:xsi="http://www.w3.org/2001/xmlscHEMA-INSTANCE" XSI:NIL=
求教。我现在用AXIS2生成了以下格式的XML:
<ns:return>
<name xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:nil="true" />
<age>12</age>
</ns:return>

很蛋疼的格式,我需要的是当我的数据元素有为空时格式是:
<ns:return>
<name></name>
<age>12</age>
</ns:return>


不知道在哪里可否设置呢?

------解决方案--------------------
这个估计要把http://www.w3.org/2001/XMLSchema-instance.dtd文件下载下来,删除里面对空的约束了。这应该是xml的一种规约吧。