第十章-XML基础及实践开发教程(第2版)-唐琳-清华大学出版社
- 格式:ppt
- 大小:272.50 KB
- 文档页数:8


i
About the Tutorial
XML stands for
Extensible
Markup
Language and is a text-based markup language derived
from Standard Generalized Markup Language (SGML).
This tutorial will teach you the basics of XML. The tutorial is divided into sections such as
XML Basics, Advanced XML, and XML tools. Each of these sections contain related topics
with simple and useful examples.
Audience
This reference has been prepared for beginners to help them understand the basic to
advanced concepts related to XML. This tutorial will give you enough understanding on
XML from where you can take yourself to a higher level of expertise.
Prerequisites
Before proceeding with this tutorial, you should have basic knowledge of HTML and
JavaScript.
Copyright & Disclaimer
Copyright 2018 by Tutorials Point (I) Pvt. Ltd.
All the content and graphics published in this e-book are the property of Tutorials Point (I)
上机题
1、
XML 指南
XML入门简介
什么是HTML
什么是XML
XML语法
XML元素必须有结束标签
XML元素必须正确的嵌套
2、
1
张三
32
男
2
李四
22
男
3、
1
tom
100
2
mary
98
第三章 上机题
1、
2、
=”©RIGHT;”>
Environment Protection
Material waste
&PUBLISHER;
it means the waste of substance or things from which something else can be made. For example,
people throw away the used metal products and buy a new one, so the old metal waste accumulates.
At last, they become waste. For example, when people finish reading newspaper, the paper will
become waste. When the glass is broken, it also becomes waste. Nobody wants to use a broken
window or drink with a broken glass or wear a pair of broken glasses. Once it is broken, it
becomes waste. The rate of using plastics is increasing day by day. People use plastic bags
计算机科学与信息工程学院
XML技术与应用实验指导书
前言
《XML编程与应用》课程是计算机科学与技术专业、网络工程等相关专业的重要专业课程之一。World Wide Web Consortium (W3C)对XML进行了如下描述:“Extensible Markup
Language,缩写为 XML,描述了一类被称为XML文档的数据对象,并部分描述了处理它们的计算机程序的行为。XML 是SGML (Standard Generalized Markup Language [ISO 8879])的一个应用实例或一种受限形式。从结构上说,XML文档顺从SGML文档标准”。Microsoft 对
XML 的定义是:Standard Generalized Markup Language (SGML) 的简化子集,专门为 Web
应用程序而设计。XML 提供描述不同类型数据的标准格式 —— 例如,约会记录、购买定单、数据库记录 —— 从而可一致而正确地解码、管理和显示信息。XML 提供表示数据的文件格式、描述数据结构的计划、以及用语义信息扩展和注释HTML的机制。总而言之,XML是一种元标注语言,该语言提供一种描述结构数据的格式。这有助于更精确地声明内容,方便跨越多种平台的更有意义的搜索结果。此外,XML越来越广泛用于新一代的基于 Web 的数据查询和处理应用程序之中。
希望同学们在使用本实验指导书及进行实验的过程中,能够帮助我们不断地发现问题,并提出建议,使《XML技术与应用》教学内容日益完善。
实验要求
在《XML技术与应用》的课程实验过程中,要求学生做到:
(1)预习实验指导书有关部分,认真做好实验内容的准备,就实验可能出现的情况提前做出思考和分析。
(2)仔细观察上机操作时出现的各种现象,记录主要情况,做出必要说明和分析。
(3)认真书写实验报告。实验报告包括实验目的和要求,实验情况及其分析。对需编程的实验,写出程序设计说明,给出源程序框图和清单。
第十讲 XML语言及其应用
主要内容
1.XML概述
1)什么是XML
2)XML应用实例
3)XML和HTML比较
2.XML语法
1)XML文档的逻辑结构
2)XML整体逻辑结构总结
3)XML文档的物理结构
3.DTD的建立和使用
1) DTD概述
2) 元素定义
3) 定义元素属性
4. Scheme的建立与应用
• XML概述
• 什么是XML
• 什么是Html(例1-1)
• 什么是Xml(例1-2)
– 需要DTD作为置标的语法
– 需要样式单来显示
– DTD的描述(例1-3)
• XML应用实例
•为置标语言FCLML公司的客户列表置表语言制定的,文档类型定义DTD,其程序为fclml.dtd(例1-4)
•客户联系信息的XML文档Client.xml (例1-5)
•为client.xml制定一个样式Mystyle.xsl (例1-6) •Html格式及显示(例1-7,例1-8)
例1-6
<xsl:stemplat match="联系人列表">
<xsl:for—each select="联系人">
<UL>
<LI><xsl:value—of select="姓名"/><LI>
<UL>
<LI>用户ID:<xsl:value—of select="ID"/></LI>
<LI>公司:<xsl:value—of select=―公司"/></LI>
<LI>EMAIL:<xsl:value—of select=―EMAIL"/></LI>
<LI>电话:<xsl:value—of select=―电话"/></LI>
<LI>街道:<xsl:value—of select=―地址/街道"/></LI>
<LI>城市:<xsl:value—of select=―地址/城市"/></LI>