我正在尝试使用我编写的模式对XML文件进行验证,但在以下行中失败:
Element 'Route', attribute '{http://www.w3.org/XML/1998/namespace}space': The attribute '{http://www.w3.org/XML/1998/namespace}space' is not allowed.
XML文件有时包含如下内容:
<Route xml:space="preserve">
</Route>
显然这是导致问题的原因,我该如何修改我的XSD文件以允许这种情况发生?
以下是我删除了所有非相关内容后的XSD:
<?xml version="1.0" standalone="yes"?>
<xs:schema id="NewDataSet" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="NewDataSet">
<xs:element name="Route" type="xs:string" minOccurs="0" />
<xs:element name="FurtherRequirements" type="xs:string" minOccurs="0" />
非常感谢您的帮助!
所有的帮助都受到了欣然接受!