80
最 新 评 论
80
专 题 分 类
80
最 新 日 志
80
最 新 留 言
80
搜 索
用 户 登 录
友 情 连 接
我 的 好 友
80
博 客 信 息
80


XML 及其应用第1章 | 2007/7/24 21:52:00

XML 技术及应用

一、学习XML语言的先决条件
(1) 熟悉HTML语言;(2) 了解Internet/Intranet的基本概念;(3) 了解C#/JAVA编程语言;

二、XML文档的结构
首先看一个XML文件的例子,文件命名为BOOK.XML;

<?xml version="1.0" encoding="UTF-8"?>
<library>
 <book id="b0836217462" available="true">
  <isbn>0836217462</isbn>
  <title lang="en">Being a Dog Is a Full-Time Job</title>
  <author id="CMS">
   <name>
    <first>Charles</first>
    <middle>M.</middle>
    <last>Schulz</last>
   </name>
   <born>1922-11-26</born>
   <dead>2000-02-12</dead>
  </author>
  <character id="Snoopy">
   <name>Snoopy</name>
   <born>1950-10-04</born>
   <qualification>extroverted beagle</qualification>
  </character>
 </book>
</library>

 
三、为什么要使用XML?
答:这主要来自Internet信息交换的危机:
(1) Connections Without Understanding;(当前的各类应用没有一个标准的数据交换格式,导致应用间的数据理解成为最大障碍)
(2) Convergence of Information Exchange Problems; (数据交换过程当中的收敛是非常重要的)
(3) Metadata Standard Is a First Step;(为了是应用对数据的共享更加便利,元数据概念显得更加重要)
(4) Shared Context Standards Deliver True Understanding;(基于内容在交换中更易于理解)
 
四、如何使用XML?
答: 计算机系统采用的两类文件
(1) 二进制文件, Such as Word documents  WordPerfect ,Acrobat, The format is not directly compatible,这些文档见如果描述的内容一样时,但不能通用文件。
(2) 文本文件,  text files can be read by many applications, and can even be read by humans, using a simple text editor  ,文本文件的使用更方便于文档见转化。
 
五、Markup 语言的历史与XML语言的关系
 
XML语言是Markup语言的一个实现而已,SGML语言也是Markup语言的实现,XML又是SGML语言的一个简化版本,什么是XML语言?

使用XML语言的好处?
(1) XML allows various professions to develop their own domain-specific markup languages
(2) XML Is Widely Used in Data Exchange
(3) XML is widely used in System Integration

XML语言不能做些什么?
(1) XML is not a programming language
(2) XML is not a network transport protocol
(3) XML is not a database

Notice: XML is a grammar which is used to define and describe data structures. All that we are interested in at the moment is the structure of data and how it is used. 
 注:XML语言就是一种用于数据结构定义与内容描述的一种标准语法,其关注点是结构和内容,与其如何将内容变现出来无关。


阅读全文 | 回复(0) | 引用通告 | 编辑 | By: 皮皮爸爸
  • 标签:XML 
  • 发表评论:

      大名:
      密码: (游客无须输入密码)
      主页:
      标题:
      80
    Powered by Oblog.