以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 DTD/XML Schema 』  (http://bbs.xml.org.cn/list.asp?boardid=23)
----  求助:怎样通过XSD读取XML,怎样带有xsi:nil="true"标签的内容,让其放回null  (http://bbs.xml.org.cn/dispbbs.asp?boardid=23&rootid=&id=58078)


--  作者:amachaoiv
--  发布时间:1/15/2008 2:19:00 PM

--  求助:怎样通过XSD读取XML,怎样带有xsi:nil="true"标签的内容,让其放回null
求助:怎样通过XSD读取XML,怎样带有xsi:nil="true"标签的内容,让其放回null

我通过dom4j的SAXReader读取,xpath进行取值,但 XPath.valueof()返回的是 "" 空字符串.
请高手们帮忙一下,跪求之!!!

<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<clients>
    <client>
        <code>C1</code>
        <name>name1</name>
    </client>
    <client>
        <code>C2</code>
        <name xsi:nil="true"/>
    </client>
</clients>
</root>


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