当我验证以下 xml 时:
<?xml version="1.0" encoding="UTF-8"?>
<AvailRateUpdateRQ xmlns="http://www.expediaconnect.com/EQC/AR/2011/06"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.expediaconnect.com/EQC/AR/2011/06 ./XSD/AvailRateUpdateRQ.xsd">
<Authentication username="user" password="ECLPASS"/>
<Hotel id="111"/>
<AvailRateUpdate>
<DateRange from="2012-04-05" to="2012-04-07"/>
<RoomType id="01">
<Inventory totalInventoryAvailable="10"/>
<RatePlan id="52ASD">
<Rate currency="EUR">
<PerDay rate="185.00"/>
</Rate>
<Restrictions minLOS="2" maxLOS="3" closedToArrival="true"/>
</RatePlan>
</RoomType>
</AvailRateUpdate>
</AvailRateUpdateRQ>
使用此架构:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2011 Expedia, Inc. All Rights Reserved -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.expediaconnect.com/EQC/AR/2011/06"
targetNamespace="http://www.expediaconnect.com/EQC/AR/2011/06"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
version="2.0.0">
<xs:element name="AvailRateUpdateRQ">
<xs:complexType>
<!-- Definitions of some other element there -->
</xs:complexType>
</xs:element>
我收到此错误:
错误:1845 元素“AvailRateUpdateRQ”:没有可用于验证根的匹配全局声明。