An alternative to @dbasemans answer would be to specify the elementFormDefault as qualified: <schema targetNamespace="http://www.example.com" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.example.com" elementFormDefault="qualified">在模式名称空间中使用xsd或xs前缀可能被认为是常见的,因此可能希望根据 dbaseman 的建议选择修改您的模式.Using the xsd or xs prefix for your schema namespace could be considered as common, so may want to choose to modify your schema as suggested by dbaseman. 这篇关于XSD验证错误:元素'{http://www.example.com}作用域':不应使用此元素.预期的是(范围)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-29 11:56