1
我对XML非常陌生,现在已准备好Ineasysteps。 我一直从解析器得到相同的问题,他说错误:元素“xsd:schema”的前缀“xsd”未绑定
5:The prefix "xsd" for element "xsd:schema" is not bound.
这是的hello.xml:
<?xml version = "1.0" encoding = "UTF-8" ?>
<!-- XML in easy steps - Page 82. -->
<doc xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation = "hello.xsd" >
<msg>Hello World</msg>
</doc>
这里是hello.xsd DOC
<?xml version="1.0" encoding = "UTF-8" ?>
<!-- XML in easy steps - Page 84. -->
<xsd:schema>
<!-- DECLARE ELEMENTS. -->
<!-- Simple types. -->
<xsd:element name="msg" type="xsd:string"/>
<!-- Complex types. -->
<xsd:element name="doc" type="docType"/>
<!-- DEFINE STRUCTURE. -->
<xsd:complexType name="docType">
<xsd:sequence>
<xsd:element ref="msg"/>
</xsd:sequence>
</xsd:complexType
谢谢你,我不知道你是怎么到答案,但它像一个魅力。再次感谢!! –
回答更新以在修复之前添加原理以帮助您查看“我如何得到该答案”。 – kjhughes