zoukankan      html  css  js  c++  java
  • XSD文件 转

    XSD  

    XSD

    XML结构定义 ( XML Schemas Definition )
    XML Schema 是DTD的替代品。XML Schema语言也就是XSD。
    XML Schema描述了XML文档的结构。可以用一个指定的XML Schema来验证某个XML文档,以检查该XML文档是否符合其要求。文档设计者可以通过XML Schema指定一个XML文档所允许的结构和内容,并可据此检查一个XML文档是否是有效的。XML Schema本身是一个XML文档,它符合XML语法结构。可以用通用的XML解析器解析它。
    一个XML Schema会定义:文档中出现的元素、文档中出现的属性、子元素、子元素的数量、子元素的顺序、元素是否为空、元素和属性的数据类型、元素或属性的默认和固定值。
    XSD是DTD替代者的原因,一是据将来的条件可扩展,二是比DTD丰富和有用,三是用XML书写,四是支持数据类型,五是支持命名空间。
    XSD文件的后缀名为.xsd。
    XML Schema的优点:
    1) XML Schema基于XML,没有专门的语法 
    2) XML可以象其他XML文件一样解析和处理 
    3) XML Schema支持一系列的数据类型(int、float、Boolean、date等) 
    4) XML Schema提供可扩充的数据模型。 
    5) XML Schema支持综合命名空间 
    6) XML Schema支持属性组。 
    XML Schema is an XML-based alternative to DTD.
    An XML schema describes the structure of an XML document.
    The XML Schema language is also referred to as XML Schema Definition (XSD).
    The purpose of an XML Schema is to define the legal building blocks of an XML document, just like a DTD:
    ·defines elements that can appear in a document 
    ·defines attributes that can appear in a document 
    ·defines which elements are child elements 
    ·defines the order of child elements 
    ·defines the number of child elements 
    ·defines whether an element is empty or can include text 
    ·defines data types for elements and attributes 
    ·defines default and fixed values for elements and attributes
    Very soon XML Schemas will be used in most Web applications as a replacement for DTDs:
    ·XML Schemas are extensible to future additions 
    ·XML Schemas are richer and more powerful than DTDs 
    ·XML Schemas are written in XML 
    ·XML Schemas support data types 
    ·XML Schemas support namespaces
  • 相关阅读:
    Python3爬取前程无忧数据分析工作并存储到MySQL
    MySQL操作数据库和表的基本语句(DDL
    MyBatis的增删改查操作
    指定方向或者位置移动
    AI-Tank
    转载人家写的CURSOR
    Ajax学习整理笔记
    全面解析注解
    java调用存储过程mysql
    JAVA如何调用mysql写的存储过程
  • 原文地址:https://www.cnblogs.com/liye/p/1555916.html
Copyright © 2011-2022 走看看