zoukankan      html  css  js  c++  java
  • schema举例一

    schema举例一:

     1 <?xml version="1.0" encoding="UTF-8"?>
     2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
     3            targetNamespace="http://www.weshare.com.cn"
     4            xmlns="http://www.weshare.com.cn"
     5            elementFormDefault="qualified">
     6 
     7     <xs:element name="actionGroup">
     8         <xs:complexType>
     9             <xs:sequence>
    10                 <xs:element name="action" maxOccurs="unbounded">
    11                     <xs:complexType>
    12                         <xs:attributeGroup ref="attributeGroup"/>
    13                     </xs:complexType>
    14                 </xs:element>
    15             </xs:sequence>
    16             <xs:attribute name="id" type="xs:string" use="required"></xs:attribute>
    17         </xs:complexType>
    18     </xs:element>
    19 
    20     <xs:attributeGroup name="attributeGroup">
    21         <xs:attribute name="id" type="xs:string" use="required"/>
    22         <xs:attribute name="fun" type="xs:string" use="required"/>
    23         <xs:attribute name="type" type="xs:string" use="required"/>
    24         <xs:attribute name="param" type="xs:string" use="required"/>
    25     </xs:attributeGroup>
    26 
    27 </xs:schema>

    XML范例:

    1 <?xml version="1.0" encoding="UTF-8"?>
    2 <actionGroup id="3333"
    3              xmlns="http://www.weshare.com.cn"
    4              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    5              xsi:noNamespaceSchemaLocation="file:///C:/workspace/Tools/UpdateProject/script_update_common/src/main/resources/schema/project/actionGroup.xsd">
    6 
    7     <action id="" fun="" type="" param=""/>
    8     <action id="" fun="" type="" param=""/>
    9 </actionGroup>

    引用示例二:

     1 <?xml version="1.0"?>
     2 <note
     3         xmlns="http://www.w3schools.com"
     4         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     5         xsi:schemaLocation="http://www.w3schools.com note.xsd">
     6     <to>Tove</to>
     7     <from>Jani</from>
     8     <heading>Reminder</heading>
     9     <body>Don't forget me this weekend!</body>
    10 </note>
  • 相关阅读:
    python中计算程序用时的方法
    既生list何生tuple
    SSAS-时间维度的标准设计
    1092 最好吃的月饼 (20 分
    1091 N-自守数 (15 分)
    1149 Dangerous Goods Packaging (25 分)
    1148 Werewolf
    1144 The Missing Number (20 分)
    1141 PAT Ranking of Institutions (25 分)
    1140 Look-and-say Sequence (20 分)
  • 原文地址:https://www.cnblogs.com/gongxr/p/9179078.html
Copyright © 2011-2022 走看看