易截截图软件、单文件、免安装、纯绿色、仅160KB

Xml Schema

Standards
"DTD" was the first formalized standard, but is rarely used anymore.
"XDR" was an early attempt by Microsoft to provide a more comprehensive standard than DTD. This standard has pretty much been abandoned now in favor of XSD.
"XSD" is currently the de facto standard for describing XML documents. There are 2 versions in use 1.0 and 1.1, which are on the whole the same (you have to dig quite deep before you notice the difference). An XSD schema is itself an XML document, there is even an a XSD schema to describe the XSD standard.
There are also a number of other standards but their take up has been patchy at best.
<xs:element/>
Sample:
<xs:element name="Customer_order" type="xs:integer" minOccurs ="0" maxOccurs="unbounded" default="unknown"|fixed=" UK"/>
Complex type
<xs:element name="Customer">
<xs:complexType>
<xs:sequence>
<xs:element name="Dob" type="xs:date" />
<xs:element name="Address" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
XML sample
<Customer>
<Dob> 2000-01-12T12:13:14Z </Dob>
<Address> 34 thingy street, someplace, sometown, w1w8uu </Address>
</Customer>
There are 3 types of compositors <xs:sequence>, <xs:choice> and <xs:all>. These compositors allow us to determine how the child elements within them appear within the XML document.
Compositor
Description
Sequence
The child elements in the XML document MUST appear in the order they are declared in the XSD schema.
Choice
Only one of the child elements described in the XSD schema can appear in the XML document.
All
The child elements described in the XSD schema can appear in the XML document in any order.
Notes
The compositors <xs:sequence> and <xs:choice> can be nested inside other


相关文档:

传智播客—XML基础(下)

今天继续讲XML,争取在下午5点前占领XML高地。一共三个主要内容:SAX解析技术,DOM4J和SCHEMA。
首先是SAX解析技术:SAX采用事件处理的方式解析XML文件。利用 SAX 解析 XML 文档,涉及两个部分:解析器和事件处理器。
解析器负责读取 XML 文档,并向事件处理器发送事件
事件处理器负责对事件做出相应,对传递的 XML 数据 ......

xml简记

SGML过于复杂,关键之处还在于主流浏览器厂商不支持SGML,web应用很好
Little version:XML
html => xhtml =>xml可以理解成是一个过渡的过程
SGML的设计理念就是把文本的内容和样式分开,自然xml也是如此。
xml一般包括以下文件:
DTD-->schema(xsd) 定义文档结构等(内容)
CSS-->XSLT (样式)
xml ---- ......

XML 初级教程

XML 被设计用来描述数据,其焦点是数据的内容。
HTML 被设计用来显示数据,其焦点是数据的外观。
应该掌握的基础知识:
在您继续学习之前,需要对以下知识有基本的了解:
HTML / XHTML
JavaScript 或 VBScript
如果您希望首先学习这些项目,请在我们的 首页 访问这些教程。
什么是XML?
XML 指可扩展标记语言(EXt ......

在XML数据中插入回车换行字符


在XML数据中,一些特殊字符必须用转义符号来代替,而回车换行字符就是属于特殊符号。
空格 (&#x20;)
Tab (&#x09;)
回车 (&#x0D;)
换行 (&#x0A;)
下面是一个报表XML数据,里面包括有回车换行字符:
<report>
<NewDataSet>
<Table>
<CustomerID>BLONP</CustomerID& ......

[备份]java中XML解析利器 dom4j的使用简介


要使用dom4j读写XML文档,需要先下载dom4j包,dom4j官方网站在 http://www.dom4j.org/
目前最新dom4j包下载地址: http://nchc.dl.sourceforge.net/sourceforge/dom4j/dom4j-1.6.1.zip
解开后有两个包,仅操作XML文档的话把dom4j-1.6.1.jar加入工程就可以了,如果需要使用XPath的话还需要加入包jaxen-1.1-beta-7.jar.
以下 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号