Advertisement
Ladies_Man

#it xml & xsd

Nov 8th, 2016
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 5.57 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  3.     <xs:element name="locker">
  4.         <xs:complexType>
  5.             <xs:sequence>
  6.                 <xs:element name="boxSmall" minOccurs="3" maxOccurs="3">
  7.                     <xs:complexType>
  8.                         <xs:sequence>
  9.                             <xs:element name="objectSmall" minOccurs="0" maxOccurs="5">
  10.                                 <xs:complexType>
  11.                                     <xs:choice>
  12.                                         <xs:element name="book" minOccurs="0">
  13.                                             <xs:complexType>
  14.                                                 <xs:attribute name="author" type="xs:string" />
  15.                                                 <xs:attribute name="title" type="xs:string" />
  16.                                             </xs:complexType>
  17.                                         </xs:element>
  18.                                         <xs:element name="other" minOccurs="0">
  19.                                             <xs:complexType>
  20.                                                 <xs:attribute name="object" type="xs:string" />
  21.                                             </xs:complexType>
  22.                                         </xs:element>
  23.                                     </xs:choice>
  24.                                 </xs:complexType>
  25.                             </xs:element>
  26.                             <xs:element name="objectLarge" minOccurs="0" maxOccurs="1">
  27.                                 <xs:complexType>
  28.                                     <xs:sequence>
  29.                                         <xs:element name="other" minOccurs="1">
  30.                                             <xs:complexType>
  31.                                                 <xs:attribute name="object" type="xs:string" />
  32.                                             </xs:complexType>
  33.                                         </xs:element>
  34.                                     </xs:sequence>
  35.                                 </xs:complexType>
  36.                             </xs:element>
  37.                          </xs:sequence>
  38.                        <xs:attribute name="state" type="xs:string" use="required"/>
  39.                     </xs:complexType>        
  40.                 </xs:element>
  41.                 <xs:element name="boxLarge" minOccurs="1" maxOccurs="1">
  42.                     <xs:complexType>
  43.                         <xs:sequence>
  44.                             <xs:element name="objectSmall" minOccurs="0" maxOccurs="10">
  45.                                 <xs:complexType>
  46.                                     <xs:choice>
  47.                                         <xs:element name="book" minOccurs="0">
  48.                                             <xs:complexType>
  49.                                                 <xs:attribute name="author" type="xs:string" />
  50.                                                 <xs:attribute name="title" type="xs:string" />
  51.                                             </xs:complexType>
  52.                                         </xs:element>
  53.                                         <xs:element name="other" minOccurs="0">
  54.                                             <xs:complexType>
  55.                                                 <xs:attribute name="object" type="xs:string" />
  56.                                             </xs:complexType>
  57.                                         </xs:element>
  58.                                     </xs:choice>
  59.                                 </xs:complexType>
  60.                             </xs:element>
  61.                             <xs:element name="objectLarge" minOccurs="0" maxOccurs="3">
  62.                                 <xs:complexType>
  63.                                     <xs:sequence>
  64.                                         <xs:element name="other" minOccurs="1">
  65.                                             <xs:complexType>
  66.                                                 <xs:attribute name="object" type="xs:string" />
  67.                                             </xs:complexType>
  68.                                         </xs:element>
  69.                                     </xs:sequence>
  70.                                 </xs:complexType>
  71.                             </xs:element>
  72.                          </xs:sequence>
  73.                        <xs:attribute name="state" type="xs:string" use="required"/>
  74.                     </xs:complexType>
  75.                 </xs:element>
  76.             </xs:sequence>
  77.             <xs:attribute name="owner" type="xs:string" use="required"/>
  78.         </xs:complexType>
  79.     </xs:element>
  80. </xs:schema>
  81.  
  82.  
  83.  
  84. <?xml version="1.0" encoding="UTF-8" ?>
  85. <locker owner="abelyaev">
  86.     <boxSmall state="open">
  87.         <objectSmall>
  88.             <book author="george r.r. martin" title="the game of thrones"/>
  89.         </objectSmall>
  90.         <objectSmall>
  91.             <book author="hebert wells" title="the invisible man"/>
  92.         </objectSmall>
  93.         <objectSmall>
  94.             <other object="mug"/>
  95.         </objectSmall>
  96.         <objectLarge>
  97.             <other object="bag"/>
  98.         </objectLarge>
  99.     </boxSmall>
  100.     <boxSmall state="open"/>
  101.     <boxSmall state="open"/>
  102.     <boxLarge state="closed">
  103.         <objectSmall>
  104.             <book author="geroge orwell"/>
  105.         </objectSmall>
  106.         <objectSmall>
  107.             <other object="notpad"></other>
  108.         </objectSmall>
  109.         <objectSmall>
  110.             <book/>
  111.         </objectSmall>
  112.         <objectLarge>
  113.             <other object="stone"/>
  114.         </objectLarge>
  115.     </boxLarge>
  116. </locker>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement