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
相关文档:
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
xml学习:http://www.w3school.com.cn/x.asp ......
应用JSP,XML和CSS技术实现弹出式菜单的工程框架。
综合采用JSP,JavaBean,XML,XSL,CSS,JavaScript多项技术的优点。
在JSP中使用XML文档,XML定义数据格式,在JSP中直接生成XML文件,它与JavaBean交互,JavaBean负责读取存储菜单项的文件。
XSL实现XML到HTML的转化,CSS文件负责样式单的定义,而JavaS ......
在
SQLServer2005
中对
XML
的处理功能显然增强了很多,提供了
query(),value(),exist(),modify(),nodes()
等函数。
关于
xml
,难以理解的不是
SQLServer
提供的函数,而是对
xml
本身的理解,看似很简单的文件格式,处理起来却是非常困难的。本文只是初探一下而已。
详见
SQLServer
联机帮助:
主题
说 ......
在XML数据中,一些特殊字符必须用转义符号来代替,而回车换行字符就是属于特殊符号。
空格 ( )
Tab (	)
回车 (
)
换行 (
)
下面是一个报表XML数据,里面包括有回车换行字符:
<report>
<NewDataSet>
<Table>
<CustomerID>BLONP</CustomerID& ......
方法一:按照XML的结构一步一步的构建XML文档.
通过.Net FrameWork SDK中的命名空间"System.Xml"中封装的各种类来实现的
方法二:直接定影XML文档,然后保存到文件。
通过"XmlDocument"类中的"LoadXml"方法
.aspx前台代码:
<%@ Page Language="C# ......