students.xml如下:<?xml version="1.0" encoding="gb2312"?>
<students xmlns="http://www.sotraining.cn"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sotraining.cn students.xsd">
<student count="1">
<id>201</id>
<name>张浩</name>
<age>24</age>
<sex>男</sex>
<birthday>198511</birthday>
<phone>13709881214</phone>
<email>[email protected]</email>
</student>
<student count="2">
<id>202</id>
<name>李然</name>
<age>23</age>
<sex>男</sex>
<birthday>198607</birthday>
<phone>13298776543</phone>
<email>[email protected]</email>
</student>
</students>使用DOM4J:doc.selectNodes("/students/student/id").size();
为什么结果返回总是0,去掉Schema的引入或改为DTD结果就为2,很是困惑,希望高手给与解答!