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