四眼看世界 XML语法
XML (EXtensible Markup Language)
XML is a
cross-platform, software and hardware independent tool for transmitting
information.
Prolog
XML
Declaration
Processing
Instructions
DOCTYPE
Declaration
Elements
Attributes
XML
Comments
CDATA
Sections
Character
and Entity References
XML
settings
XML processors
treat the character sequence Carriage Return-Line Feed (CRLF) like single CR or
LF characters. All are reported as a single LF character. Applications can save
documents using the appropriate line-ending convention.
Elements
XML documents must
contain one and only one root element
XML
Declaration
<?xml
version="1.0" encoding="UTF-8"?>
If used it must be the first line in the document and no other content or white space can precede it
Version
Declaration
The
version declaration is mandatory and the version number 1.0 is the latest
version currently
Encoding
Declaration
It
must contain a value representing an existing character encoding
Processing
Instructions
Processing
instructions do not have to follow much internal syntax, can include markup
characters without escaping them, and can appear anywhere in the document
outside of other markup. Processing instructions must begin with an identifier
called a target which is are case-sensitive.
Style Sheet
Processing Instructions
<?xml-stylesheet
type="type" href="uri" ?>
DOCTYPE
Declaration
<!DOCTYPE
rootElement PUBLIC "PublicIdentifier" "URIreference">
The
PublicIdentifier provides a separate identifier that some XML parsers can use to
reference the DTD in place of the URIreference. This is useful if the parser is
used on a system without a network connection or where that connection would
slow down processing significantly
XML
Comments
<!--
-->
Comments cannot be
nested
CDATA
Sections
<![CDATA[
]]>
Character
references do not work within CDATA sections.
CDATA
相关文档:
标签:数据访问 LINQ to XML
LINQ to XML并不打算替代标准的XML API,只是补充了这些标准XML类 ......
XML(Extensible Markup Language)即可扩展标记语言,它与HTML一样,都是SGML(Standard Generalized Markup Language,标准通用标记语言)。Xml是Internet环境中跨平台的,依赖于内容的技术,是当前处理结构化文档信息的有力工具。扩展标记语言XML是一种简单的数据存储语言,使用一系列简单的标记描述数据,而这些标记可 ......
通过Asp.net(C#)应用程序读取本地上传的Excle文件,存放到DataSet中,通过DataSet中的方法直接生成XML文件.
C# Code
if (this.FileUpload1.PostedFile != null)
{
string filename = this.FileUpl ......
==========================================
xml文件
<?xml version="1.0" encoding="GB2312"?>
<RESULT>
<VALUE>
<NO>A1234</NO>
<ADDR>四川省XX县XX镇XX路X段XX号</ADDR>
</VALUE>
<VALUE>
<NO>B1234</NO>
<ADDR>四川省XX市XX乡XX ......