以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 DTD/XML Schema 』  (http://bbs.xml.org.cn/list.asp?boardid=23)
----  xml映射的问题  (http://bbs.xml.org.cn/dispbbs.asp?boardid=23&rootid=&id=62194)


--  作者:hh661193
--  发布时间:5/5/2008 5:01:00 PM

--  xml映射的问题
<?xml version="1.0" encoding="utf-8" ?>
<result>
<iq name="111">
<item>111</item>
<item>222</item>
<item>333</item>
<item>444</item>
<item>555</item>
</iq>
</result>
只要取item中的字符串的list

<!DOCTYPE databases PUBLIC
"-//EXOLAB/Castor Mapping DTD Version 1.0//EN"
"http://castor.exolab.org/mapping.dtd">
<mapping>
<description>Basic mapping example</description>
<class name="Result" auto-complete="false">
<map-to xml="result"/>
<field name="items" collection="collection" type="ItemId">
<bind-xml name="item" location="iq"/>
</field>
</class>
<class name="ItemId" auto-complete="false">
<field name="id">
<bind-xml name="item" node="text"/>
</field>
</class>
</mapping>

老是报错
The value of attribute "name" must not contain the '<' character.{File: ; line: 1; column: 73}

求高手解


--  作者:jingwan
--  发布时间:6/28/2008 7:07:00 PM

--  
不会,帮你顶
W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
78.125ms