我必須爲我的xsd手寫一個xml示例,但我總是收到無效消息:cvc-elt.1.a:找不到元素'RS_WMS_GET_PO_DATA_v2.0'的聲明。cvc-elt.1.a:無法找到元素'xxx'的聲明
我的XSD:
<?xml version="1.0" encoding="utf-16"?>
<schema xmlns:ns0="http://www.rossinc.com/" xmlns:msbtsdml="http://schemas.rossinc.com/BizTalk" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://www.rossinc.com/" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
<msbtsdml:StoredProcedureName xmlns:msbtsdml="http://schemas.rossinc.com/BizTalk/DMLAdapter">RS_WMS_GET_PO_DATA</msbtsdml:StoredProcedureName>
<msbtsdml:ResponseRootName xmlns:msbtsdml="http://schemas.rossinc.com/BizTalk/DMLAdapter">poData</msbtsdml:ResponseRootName>
</appinfo>
</annotation>
<element name="RS_WMS_GET_PO_DATA_v2.0">
<complexType>
<sequence>
<element minOccurs="1" maxOccurs="1" name="Parameters">
<complexType>
<sequence>
<element default="0" name="ERROR_OCCURRED" type="string">
<annotation>
<appinfo>
<msbtsdml:ParamDir xmlns:msbtsdml="http://schemas.microsoft.com/BizTalk/2003">In</msbtsdml:ParamDir>
</appinfo>
</annotation>
</element>
<element default="1" name="XML_TAGS" type="int">
<annotation>
<appinfo>
<msbtsdml:ParamDir xmlns:msbtsdml="http://schemas.microsoft.com/BizTalk/2003">In</msbtsdml:ParamDir>
</appinfo>
</annotation>
</element>
<element default="0" name="NUM_ROWS" type="int">
<annotation>
<appinfo>
<msbtsdml:ParamDir xmlns:msbtsdml="http://schemas.microsoft.com/BizTalk/2003">In</msbtsdml:ParamDir>
</appinfo>
</annotation>
</element>
</sequence>
</complexType>
</element>
<element name="RS_WMS_GET_PO_DATA">
<complexType>
<all minOccurs="1" maxOccurs="1">
<element name="COMPANY_CODE" type="string" />
<element name="DIVISION" type="string" />
<element name="PO_NUMBER" type="string" />
<element name="PO_WH_SEQUENCE" type="string" />
<element name="ERP_ACTION_CODE" type="string" />
</all>
</complexType>
</element>
<element name="DMLAdapterConfig">
<complexType>
<sequence>
<element name="EnvironmentId" type="string" />
</sequence>
</complexType>
</element>
</sequence>
</complexType>
</element>
</schema>
我的XML:
<?xml version="1.0" encoding="UTF-8"?>
<RS_WMS_GET_PO_DATA_v2.0>
<Parameters>
<ERROR_OCCURRED>0</ERROR_OCCURRED>
<XML_TAGS>1</XML_TAGS>
<NUM_ROWS>0</NUM_ROWS>
</Parameters>
<RS_WMS_GET_PO_DATA>
<COMPANY_CODE></COMPANY_CODE>
<DIVISION></DIVISION>
<PO_NUMBER></PO_NUMBER>
<PO_WH_SEQUENCE></PO_WH_SEQUENCE>
<ERP_ACTION_CODE></ERP_ACTION_CODE>
</RS_WMS_GET_PO_DATA>
<DMLAdapterConfig>
<EnvironmentId></EnvironmentId>
</DMLAdapterConfig>
</RS_WMS_GET_PO_DATA_v2.0>
任何想法?
下面是我使用的網站: http://www.corefiling.com/opensource/schemaValidate.html
[cvc-elt.1:找不到元素'MyElement'的聲明](http://stackoverflow.com/questions/13310637/cvc-elt-1-cannot-find-the-declaration- of-element-myelement) – crownjewel82 2014-06-19 17:08:44