对此感兴趣,用你的程序也试了试,当没改此句<onth>January</onth>时,输出:
Invalid content was found starting with element 'onth'. One of '{"":month}' is expected.
当把<onth>January</onth>改为<month>January</onth>时,输出:
The element type "month" must be terminated by the matching end-tag "</month>".XML文件内容:
<?xml version="1.0" encoding="UTF-8"?>
<birthdate>
<month>January</onth>
<day>21</day>
<year>1983</year>
</birthdate>
XSD内容:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="birthdate">
<xs:complexType>
<xs:sequence>
<xs:element name="month" type="xs:string" />
<xs:element name="day" type="xs:int" />
<xs:element name="year" type="xs:int" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Invalid content was found starting with element 'onth'. One of '{"":month}' is expected.
当把<onth>January</onth>改为<month>January</onth>时,输出:
The element type "month" must be terminated by the matching end-tag "</month>".XML文件内容:
<?xml version="1.0" encoding="UTF-8"?>
<birthdate>
<month>January</onth>
<day>21</day>
<year>1983</year>
</birthdate>
XSD内容:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="birthdate">
<xs:complexType>
<xs:sequence>
<xs:element name="month" type="xs:string" />
<xs:element name="day" type="xs:int" />
<xs:element name="year" type="xs:int" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
解决方案 »
- 输入的是1234,结果为何是锘?234?
- Servlet文件下载问题
- middlegen 中 NoClassDefFoundError: org/apache/log4j/Categor
- 高分求liferay portal 的开发问题
- 不想活了!!!!!!tomcat安装不了!!!!!!!!
- SSH框架是否需要进行多线程设置
- 新人求教问题
- 关于一个web.xml文件中配置servlet的问题
- 一个struts的问题。高手近来看看。不会的捧个人场up有分。
- 跪求解决springmvc responsebody返回中文乱码
- spring<!-- DAO 的IoC配置//-->找不到DAO 帮忙啊
- jbpm的流程图如何在web页面上显示
http://www.w3.org/TR/xml-schema-1#cvc-complex-type.2.4.a?mont&{"":month}请问,你是如何运行,什么还境,谢谢。
你能否告知msn, 能当面请教, 不胜感激。
<birthdate>
<onth> January </onth>
<!-- 上一行改为: <month> January </month> -->
<day> 21 </day>
<year> 1983 </year>
</birthdate>