XML Tutorial
41 pages
English

XML Tutorial

-

Le téléchargement nécessite un accès à la bibliothèque YouScribe
Tout savoir sur nos offres
41 pages
English
Le téléchargement nécessite un accès à la bibliothèque YouScribe
Tout savoir sur nos offres

Description

XML Tutorial
Thomas G. Habing
Grainger Engineering Library
Information Center
E-Text Working Group
2004-01-15 Presenters
Tom Habing
Research Programmer, Grainger Engineering
Library Information Center
thabing@uiuc.edu
XML Tutorial
2004-01-
15
Tom Hab
i
ng
2 Agenda –
X
ML Tutorial
1.
Well-formed XML (basic markup)
2.
DTDs
and schemas
3.
Stylesheets
4.
XML and databases
Topics include illustrations, demos, and exercises.
XML Tutorial
2004-01-
15
Tom Hab
i
ng
3






1.
Well-formed XML
XML 1.0 Specification
Markup
Prolog & Document Type Declaration
Elements
Attributes
Content
Entities
Encoded (Unicode) characters
XML Tutorial
2004-01-
15
Tom Hab
i
ng
4




Prolog & Document Type Definition
XML documents should begin with an XML
Declaration which specifies version
Optionally may also include:
Encoding (recommended)
Stand-alone declaration
Document Type Definition is typically next


XML Tutorial
2004-01-
15
Tom Hab
i
ng
5





Elements
Elements are markup that enclose content

or
Content models
Parsed Character Data Only
Child Elements Only
Mixed
Empty

Cole, T

XML Tutorial
2004-01-
15
Tom Hab
i
ng
6



Attributes
Associate a name-value pair with an element
name2='value2'>…
Can be used to embellish content…
or to associate added content to an ...

Sujets

Informations

Publié par
Nombre de lectures 207
Langue English

Extrait

XML Tutorial
Thomas G. Habing
Grainger Engineering Library Information Center
E-Text Working Group 2004-01-15
Presenters
Tom Habing
Research Programmer, Grainger Engineering Library Information Center
thabing@uiuc.edu
2004-01-15
XML Tutorial Tom Habing
2
1.
2.
3.
4.
Agenda –XML Tutorial
Well-formed XML (basic markup)
DTDs and schemas
Stylesheets
XML and databases
Topics include illustrations, demos, and exercises.
2004-01-15
XML Tutorial Tom Habing
3
1.
Well-formed XML
XML 1.0 Specification
„Markup
„Prolog & Document Type Declaration
„Elements
„Attributes
„Content
„Entities
„Encoded (Unicode) characters
2004-01-15
XML Tutorial Tom Habing
4
„
„
Prolog & Document Type Definition
XML documents should begin with an XML Declaration which specifies version „Optionally may also include: „Encoding (recommended) „Stand-alone declaration
Document Type Definition is typically next
<?xml version="1.0" encoding='UTF-8' standalone='no' ?>
<!DOCTYPE root SYSTEM "myDocs.dtd" >
2004-01-15
XML Tutorial Tom Habing
5
Elements
Elements are markup that enclose content
„<element name>…</element name> _ _ or <element name /> _
„Content models „Parsed Character Data Only „Child Elements Only „Mixed „Empty
<author>Cole, T</author>
2004-01-15
XML Tutorial Tom Habing
6
Attributes
Associate a name-value pair with an element „<tag name1="value1" name2='value2'>…</tag> „Can be used to embellish content… „to associate added content to an elementor „Attributes beginning XML are reserved
<author order='1'>Cole, T</author> <author name='Habing, T'/>
2004-01-15
XML Tutorial Tom Habing
7
Entities
„Placeholders for internal or external content „Placeholder for a single character… „or string of text… „or external content (images, audio, etc.) „Implementation specifics may vary
<!ENTITY copyright "&#xA9;" > &copyright; is replaced by © <!ENTITY pic SYSTEM "mugshot.gif" NDATA gif > &pic; is replaced by graphic image
2004-01-15
XML Tutorial Tom Habing
8
„
„
„
„
Character Encoding Issues
XML Parsers must acceptUTF-8&UTF-16
Also must accept&#nnnn;or&#xhhhh;
MARC-8 encodings must be converted to Unicode for use in XML
Special rules for EOL and control characters „Changes will be effective version 1.1
http://lcweb.loc.gov/marc/specifications/specchartables.html
2004-01-15
XML Tutorial Tom Habing
9
Namespaces
„Qualify element and attribute names „Allows modularization of schemas „ ultiMix and match element le in document instances s from m p schemas „ htrmeIme aniot iXnMcLl uSdceh pforromt  oonre ano
_ <oai:metadata xmlns:oai='http:…' xmlns:oai dc='…' xmlns:dc='…'> <oai dc:dc> _ <dc:title>…</dc:title> <dc:creator>…</dc:creator>
02400--115XMToL mT uHtaobriianlg10
ZVON Tutorial
http://www.zvon.org/xxl/XMLTutorial/General/contents.html
2004-01-15
XML Tutorial Tom Habing
11
  • Univers Univers
  • Ebooks Ebooks
  • Livres audio Livres audio
  • Presse Presse
  • Podcasts Podcasts
  • BD BD
  • Documents Documents