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>
  • 相关阅读:
    服务器SSL不安全漏洞修复方案
    vs2010 vs2013等vs中如何统计整个项目的代码行数
    Windows10中的IIS10.0安装php manager和IIS URL 重写2.0组件的方法
    让Windows Server 2008r2 IIS7.5 ASP.NET 支持10万并发请求
    angularJS 上传multipart/form-data
    idea 取消缩进
    Java 自动检测文本文件编码
    idea 快捷键
    java 8 bug
    Python学习笔记
  • 原文地址:https://www.cnblogs.com/gongxr/p/9179078.html
Copyright © 2011-2022 走看看