2
XML輸入找不到元素的聲明「模板
<?xml version="1.0"?>
<Templates>
<Template>
<ObjTmplId>1</ObjTmplId>
<AttTmplId>1</AttTmplId>
<Is_Ingest>0</Is_Ingest>
<System_Name>DNC</System_Name>
<System_Category>ALL</System_Category>
<System_Class>hazarda</System_Class>
<System_Table>BD000</System_Table>
<System_Attribute>cod</System_Attribute>
<System_Value>-32768</System_Value>
</Template>
</Templates>
XSD文檔
<?xml version= '1.0' encoding= 'UTF-8' ?>
<xsd:schema targetNamespace="http://cfpe/export/objects" xmlns="http://cfpe/export /objects" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xsd:element name="Templates" type="TemplateListType" />
<xsd:complexType name="TemplateListType">
<xsd:sequence>
<xsd:element name="Template" type="TemplateType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="TemplateType">
<xsd:sequence>
<xsd:element name="ObjTmplId" type="xsd:integer"/>
<xsd:element name="AttTmplId" type="xsd:integer"/>
<xsd:element name="Is_Ingest" type="xsd:integer"/>
<xsd:element name="System_Name" type="xsd:string"/>
<xsd:element name="System_Category" type="xsd:string"/>
<xsd:element name="System_Class" type="xsd:string"/>
<xsd:element name="System_Table" type="xsd:string"/>
<xsd:element name="System_Attribute" type="xsd:string"/>
<xsd:element name="System_Value" type="xsd:string"/>
<xsd:element name="Condition" minOccurs="0" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
的XSD無法驗證XML。我正在嘗試使用xsd有效的xml文件。我附上兩個XML和XSD文件
前綴 「XSD」 對於元素驗證 「XSD:元素」 未綁定。 – 2014-09-18 16:20:25
它用/>關閉 – user3983344 2014-09-18 17:47:42