Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xml &引用;找不到元素“的声明”;使用XSD进行验证_Xml_Xsd_Xsd Validation_Xml Validation - Fatal编程技术网

Xml &引用;找不到元素“的声明”;使用XSD进行验证

Xml &引用;找不到元素“的声明”;使用XSD进行验证,xml,xsd,xsd-validation,xml-validation,Xml,Xsd,Xsd Validation,Xml Validation,我是XML的完全初学者,我正在尝试学习XML模式。我有两个文件: note.xml 托弗 贾尼 提醒 这个周末别忘了我! note.xsd 在note.xml中,我得到了错误 cvc elt.1.a:找不到元素“note”.xml的声明 在我的根音符元素上。我在这里看到过其他的帖子,不过是关于更复杂的解决方案,但我是一个完全的初学者,一点也不懂。如果您能指导我克服这个错误,我将不胜感激。更改 xsi:schemaLocation="https://www.w3schools.c

我是XML的完全初学者,我正在尝试学习XML模式。我有两个文件:

note.xml

托弗
贾尼
提醒
这个周末别忘了我!
note.xsd

在note.xml中,我得到了错误

cvc elt.1.a:找不到元素“note”.xml的声明

在我的根音符元素上。我在这里看到过其他的帖子,不过是关于更复杂的解决方案,但我是一个完全的初学者,一点也不懂。如果您能指导我克服这个错误,我将不胜感激。

更改

xsi:schemaLocation="https://www.w3schools.com/xml note.xsd"

以便名称空间URL匹配
xmlns=”https://www.w3schools.com“
在XML文档和
targetNamespace=”https://www.w3schools.com“
在XSD中

另见
改变

xsi:schemaLocation="https://www.w3schools.com/xml note.xsd"

以便名称空间URL匹配
xmlns=”https://www.w3schools.com“
在XML文档和
targetNamespace=”https://www.w3schools.com“
在XSD中

另见
xsi:schemaLocation="https://www.w3schools.com/xml note.xsd"
xsi:schemaLocation="https://www.w3schools.com note.xsd"