一个scheme 的例子
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.travelsky.com/pnrSchema" xmlns:tns="http://www.travelsky.com/pnrSchema" elementFormDefault="qualified">
<complexType name="PnrInfoDef">
<sequence>
<element name="RLC" minOccurs="1" maxOccurs="1"
type="tns:RLCDef">
</element>
<element name="CreateDate" type="dateTime" minOccurs="1"
maxOccurs="1">
</element>
<element name="Group" type="boolean" minOccurs="1"
maxOccurs="1">
</element>
<element name="Cancelled" type="boolean" minOccurs="1"
maxOccurs="1">
</element>
<element name="UpdateDate" type="dateTime" maxOccurs="1" minOccurs="1"></element>
</sequence>
</complexType>
<simpleType name="RLCDef">
<restriction base="hexBinary">
<minLength value="4"></minLength>
<maxLength value="5"></maxLength>
</restriction>
</simpleType>
<simpleType name="CityCodeDef">
<restriction base="string">
<length value="3"></length>
</restriction>
</simpleType>
<simpleType name="OfficeCodeDef">
<restriction base="string">
<length value="6"></length>
</restriction>
</simpleType>
<simpleType name="AgentCodeDef">
<restriction base="string">
<length value="9"></length>
</restriction>
</simpleType>
<simpleType name="CarrierDef">
<restriction base="string">
<minLength value="2"></minLength>
<maxLength value="3"></maxLength>
</restriction>
</simpleType>
<simpleType name="FlightDef">
<restriction base="string">
<length value="6"></length>
</restriction>
</simpleType>
<simpleType name="BookingClassDef">
<restriction base="string">
<length value="1"></length>
</restriction>
</simpleType>
<simpleType name="StatusCodeDef">
<restriction base="string">
<length value="2"></length>
</restriction>
</simpleType>
<complexType name="SegmentDef">
<sequence>
<element name="ElementID" type="int" maxOccurs="1" minOccurs="1"></element>
<element name="ARNK" type="boolean" maxOccurs="1" minOccurs="1"></element>
<element name="Carrier1" type="tns:CarrierDef" maxOccurs="1" minOccurs="1"></element>
<element name="Carrier2" type="tns:CarrierDef" maxOccurs="1" minOccurs="1"></element>
<element name="FlightNumber" type="tns:FlightDef" maxOccurs="1" minOccurs="1"></element>
<element name="BookingClass" type="tns:BookingClassDef" maxOccurs="1" minOccurs="1"></element>
<element name="Origin" type="tns:CityCodeDef" maxOccurs="1" minOccurs="1"></element>
<element name="Destination" type="tns:CityCodeDef" maxOccurs="1" minOccurs="1"></element>
<element name="DepartureTime" type="dateTime" maxOccurs="1" minOccurs="1"></element>
<element name="ArrivalTime" type="dateTime" maxOccurs="1" minOccurs="1"></element>
<element name="StatusCode" type="tns:StatusCodeDef" maxOccurs="1" minOccurs="1"></element>
</sequence>
</complexType>
<complexType name="ResponsibilityDef">
<sequence>
<element name="BookingCity" type="string"></element>
<element name="BookingOffice" type="string"></element>
<element name="BookingAgent" type="string"></element>
<element name="UpdateCity" type="string"></element>
<element name="UpdateOffice" type="string"></element>
<element name="UpdateAgent" type="string"></element>
<element name="ResponsibleCity" type="string"></element>
<element name="ResponsibleOffice" type="string"></element>
<element name="ResponsibleAgent" type="string"></element>
</sequence>
</complexType>
<complexType name="OSIDef">
<sequence>
<element name="CarrierCode" type="tns:CarrierDef"></element>
<element name="Text" type="string"></element>
</sequence>
<attribute name="PassengerID" type="int"></attribute>
</complexType>
<complexType name="SSRDef">
<sequence>
<element name="CarrierCode" type="tns:CarrierDef"></element>
<element name="SSRCode" type="string"></element>
<element name="Text" type="string"></element>
</sequence>
<attribute name="PassengerID" type="int"></attribute>
<attribute name="SegmentID" type="int"></attribute>
</complexType>
<complexType name="RemarkDef">
<sequence>
<element name="Text" type="string"></element>
</sequence>
<attribute name="PassengerID" type="int"></attribute>
</complexType>
<complexType name="TicketDef">
<sequence>
<element name="TicketNumber" type="string"></element>
<element name="IssueAirline" type="tns:CarrierDef"></element>
<element name="IssueOffice" type="tns:OfficeCodeDef"></element>
<element name="IssueAgent" type="tns:AgentCodeDef"></element>
<element name="IssueDate" type="dateTime"></element>
</sequence>
<attribute name="PassengerID" type="int"></attribute>
<attribute name="SegmentID" type="int"></attribute>
</complexType>
<complexType name="PassengerDef">
<sequence>
<element name="PassengerID" type="int" maxOccurs="1" minOccurs="1"></element>
<element name="PassengerName" type="string" maxOccurs="1"
minOccurs="1">
</element>
<element name="Infant" type="boolean" maxOccurs="1" minOccurs="1"></element>
</sequence>
</complexType>
<complexType name="ContactDef">
<sequence>
<element name="Type" type="string"></element>
<element name="Text" type="string"></element>
</sequence>
<attribute name="PassengerID" type="int"></attribute>
</complexType>
<complexType name="PNRDef">
<sequence>
<element name="PnrInfo" type="tns:PnrInfoDef" minOccurs="1"
maxOccurs="1">
</element>
<element name="Passenger" type="tns:PassengerDef"
minOccurs="0" maxOccurs="unbounded">
</element>
<element name="Segment" type="tns:SegmentDef" minOccurs="0"
maxOccurs="unbounded">
</element>
<element name="SSR" type="tns:SSRDef" minOccurs="0"
maxOccurs="unbounded">
</element>
<element name="OSI" type="tns:OSIDef" minOccurs="0"
maxOccurs="unbounded">
</element>
<element name="Ticket" type="tns:TicketDef" minOccurs="0"
maxOccurs="unbounded">
</element>
<element name="Remark" type="tns:RemarkDef" minOccurs="0"
maxOccurs="unbounded">
</element>
<element name="Responsibility" type="tns:ResponsibilityDef"
minOccurs="1" maxOccurs="1">
</element>
<element name="Contact" type="tns:ContactDef" minOccurs="0"
maxOccurs="unbounded">
</element>
</sequence>
</complexType>
<element name="PNR" type="tns:PNRDef"></element>
</schema>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.travelsky.com/pnrSchema" xmlns:tns="http://www.travelsky.com/pnrSchema" elementFormDefault="qualified">
<complexType name="PnrInfoDef">
<sequence>
<element name="RLC" minOccurs="1" maxOccurs="1"
type="tns:RLCDef">
</element>
<element name="CreateDate" type="dateTime" minOccurs="1"
maxOccurs="1">
</element>
<element name="Group" type="boolean" minOccurs="1"
maxOccurs="1">
</element>
<element name="Cancelled" type="boolean" minOccurs="1"
maxOccurs="1">
</element>
<element name="UpdateDate" type="dateTime" maxOccurs="1" minOccurs="1"></element>
</sequence>
</complexType>
<simpleType name="RLCDef">
<restriction base="hexBinary">
<minLength value="4"></minLength>
<maxLength value="5"></maxLength>
</restriction>
</simpleType>
<simpleType name="CityCodeDef">
<restriction base="string">
<length value="3"></length>
</restriction>
</simpleType>
<simpleType name="OfficeCodeDef">
<restriction base="string">
<length value="6"></length>
</restriction>
</simpleType>
<simpleType name="AgentCodeDef">
<restriction base="string">
<length value="9"></length>
</restriction>
</simpleType>
<simpleType name="CarrierDef">
<restriction base="string">
<minLength value="2"></minLength>
<maxLength value="3"></maxLength>
</restriction>
</simpleType>
<simpleType name="FlightDef">
<restriction base="string">
<length value="6"></length>
</restriction>
</simpleType>
<simpleType name="BookingClassDef">
<restriction base="string">
<length value="1"></length>
</restriction>
</simpleType>
<simpleType name="StatusCodeDef">
<restriction base="string">
<length value="2"></length>
</restriction>
</simpleType>
<complexType name="SegmentDef">
<sequence>
<element name="ElementID" type="int" maxOccurs="1" minOccurs="1"></element>
<element name="ARNK" type="boolean" maxOccurs="1" minOccurs="1"></element>
<element name="Carrier1" type="tns:CarrierDef" maxOccurs="1" minOccurs="1"></element>
<element name="Carrier2" type="tns:CarrierDef" maxOccurs="1" minOccurs="1"></element>
<element name="FlightNumber" type="tns:FlightDef" maxOccurs="1" minOccurs="1"></element>
<element name="BookingClass" type="tns:BookingClassDef" maxOccurs="1" minOccurs="1"></element>
<element name="Origin" type="tns:CityCodeDef" maxOccurs="1" minOccurs="1"></element>
<element name="Destination" type="tns:CityCodeDef" maxOccurs="1" minOccurs="1"></element>
<element name="DepartureTime" type="dateTime" maxOccurs="1" minOccurs="1"></element>
<element name="ArrivalTime" type="dateTime" maxOccurs="1" minOccurs="1"></element>
<element name="StatusCode" type="tns:StatusCodeDef" maxOccurs="1" minOccurs="1"></element>
</sequence>
</complexType>
<complexType name="ResponsibilityDef">
<sequence>
<element name="BookingCity" type="string"></element>
<element name="BookingOffice" type="string"></element>
<element name="BookingAgent" type="string"></element>
<element name="UpdateCity" type="string"></element>
<element name="UpdateOffice" type="string"></element>
<element name="UpdateAgent" type="string"></element>
<element name="ResponsibleCity" type="string"></element>
<element name="ResponsibleOffice" type="string"></element>
<element name="ResponsibleAgent" type="string"></element>
</sequence>
</complexType>
<complexType name="OSIDef">
<sequence>
<element name="CarrierCode" type="tns:CarrierDef"></element>
<element name="Text" type="string"></element>
</sequence>
<attribute name="PassengerID" type="int"></attribute>
</complexType>
<complexType name="SSRDef">
<sequence>
<element name="CarrierCode" type="tns:CarrierDef"></element>
<element name="SSRCode" type="string"></element>
<element name="Text" type="string"></element>
</sequence>
<attribute name="PassengerID" type="int"></attribute>
<attribute name="SegmentID" type="int"></attribute>
</complexType>
<complexType name="RemarkDef">
<sequence>
<element name="Text" type="string"></element>
</sequence>
<attribute name="PassengerID" type="int"></attribute>
</complexType>
<complexType name="TicketDef">
<sequence>
<element name="TicketNumber" type="string"></element>
<element name="IssueAirline" type="tns:CarrierDef"></element>
<element name="IssueOffice" type="tns:OfficeCodeDef"></element>
<element name="IssueAgent" type="tns:AgentCodeDef"></element>
<element name="IssueDate" type="dateTime"></element>
</sequence>
<attribute name="PassengerID" type="int"></attribute>
<attribute name="SegmentID" type="int"></attribute>
</complexType>
<complexType name="PassengerDef">
<sequence>
<element name="PassengerID" type="int" maxOccurs="1" minOccurs="1"></element>
<element name="PassengerName" type="string" maxOccurs="1"
minOccurs="1">
</element>
<element name="Infant" type="boolean" maxOccurs="1" minOccurs="1"></element>
</sequence>
</complexType>
<complexType name="ContactDef">
<sequence>
<element name="Type" type="string"></element>
<element name="Text" type="string"></element>
</sequence>
<attribute name="PassengerID" type="int"></attribute>
</complexType>
<complexType name="PNRDef">
<sequence>
<element name="PnrInfo" type="tns:PnrInfoDef" minOccurs="1"
maxOccurs="1">
</element>
<element name="Passenger" type="tns:PassengerDef"
minOccurs="0" maxOccurs="unbounded">
</element>
<element name="Segment" type="tns:SegmentDef" minOccurs="0"
maxOccurs="unbounded">
</element>
<element name="SSR" type="tns:SSRDef" minOccurs="0"
maxOccurs="unbounded">
</element>
<element name="OSI" type="tns:OSIDef" minOccurs="0"
maxOccurs="unbounded">
</element>
<element name="Ticket" type="tns:TicketDef" minOccurs="0"
maxOccurs="unbounded">
</element>
<element name="Remark" type="tns:RemarkDef" minOccurs="0"
maxOccurs="unbounded">
</element>
<element name="Responsibility" type="tns:ResponsibilityDef"
minOccurs="1" maxOccurs="1">
</element>
<element name="Contact" type="tns:ContactDef" minOccurs="0"
maxOccurs="unbounded">
</element>
</sequence>
</complexType>
<element name="PNR" type="tns:PNRDef"></element>
</schema>
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 张高兴的大模型开发实战:(一)使用 Selenium 进行网页爬虫
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构