小编Try*_*ipt的帖子

错误:元素“xsd:schema”的前缀“xsd”未绑定

我对 XML 非常陌生,目前准备使用 Ineasysteps。我不断从解析器那里得到同样的问题

5:元素“xsd:schema”的前缀“xsd”未绑定。

这是 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>
Run Code Online (Sandbox Code Playgroud)

这是 hello.xsd 文档

<?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"/> …
Run Code Online (Sandbox Code Playgroud)

xml xsd xml-validation xsd-validation

2
推荐指数
1
解决办法
8161
查看次数

标签 统计

xml ×1

xml-validation ×1

xsd ×1

xsd-validation ×1