XSD 介绍
来源:互联网 发布:淘宝客建站教程2016 编辑:程序博客网 时间:2024/04/29 04:16
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
附个人见解:
xml的Schema文件
如果把xml看做数据库的数据,那么Schema文件就相当于数据库,表的结构(比如有哪些字段,约束等等)
- XSD 介绍
- XSD工具使用方法介绍
- XSD
- XSD
- xsd
- XSD(XML Schema Definition)用法实例介绍以及C#使用xsd文件验证XML格式
- XSD - 元素
- XSD 属性
- XSD 元素
- XSD 实例
- xsd限定
- XSD Demo
- Xsd文件
- xsd文件
- 初试XSD
- dataset.xsd
- XSD 数据类型
- xsd资料
- IIS GZIP 压缩方法
- WINCE 多IP地址设置
- 亲历史上最棒的空调
- HTML.PS.FLASH 技术:制作HTML按钮
- 使用红黑树实现的map
- XSD 介绍
- 如何处理Jdeveloper 启动时出现的错误-Unable to create an instance of the Java Virtual Machine
- PreferenceActivity 全接触
- andoid编译 整合busybox
- 驱动模型-platform (kernel 2.6.27)
- .NET 中自定义事件的驱动(C#)
- ubuntu下终端邮件客户端msmtp
- 用java多线程实现一个控制台聊天室
- 用java多线程实现一个控制台聊天室