Title: XML
1XML
- Enn Õunapuu
- Tallinna Tehnikaülikool
- enn_at_cc.ttu.ee
- 372 050 97720
2XML näide
- Tavaline tekst
- Te võiksite vaadata Mark Wilson raamatut XML and
the Internet for Visual Basic 6 Manningsi
kodulehel. Vaadake autori publikatsioonide
jaotist author online section. Et saada kontakti
teiste Visual Basic huvilistega minge
http//www.vbxml.com - XML tekst
- ltreview subject-type"book"gt Te võiksite vaadata
ltAUTHORgtMark Wilsonlt/AUTHORgt raamatut
ltBOOK_NAMEgtXML and the Internet for Visual Basic
6lt/BOOK_NAMEgt ltPUBLISHERgtManningsilt/PUBLISHERgt
kodulehel. Vaadake autori publikatsioonide
jaotist ltLINK_AREAgt author online
sectionlt/LINK_AREAgt. Et saada kontakti teiste
ltUSER_TOPICgtVisual Basic lt/USER_TOPICgt
huvilistegaltBOOK_TOPICgtXMLlt/BOOK_TOPICgt , minge
ltURLgthttp//www.vbxml.comlt/URLgt.
3DTD
XML Schema
XML Data Types
XML
XSL
CSS
Application
XPL
XLL
HTML
XML
Resources
4Xml ülevaade
www.w3.org/xml SGML näide ltEMailgt ltsendergt
ltpersongt ltfirstnamegt Karen
lt/firstnamegt ltlastnamegt Lemone
lt/lastnamegt lt/persongt ltreceivergt
ltpersongt ltdistributionListgt
cs525_at_cs lt/distributionListgt lt/persongt
lt/receivergt ltcontentsgt Don't you
agree this is really ugly? lt/contentsgt lt/EMailgt
5DTD
lt!ELEMENT note (to,from,heading,body)gt lt!ELEMENT
to (PCDATA)gt lt!ELEMENT from (PCDATA)gt
lt!ELEMENT heading (PCDATA)gt lt!ELEMENT body
(PCDATA)gt
6XML SCHEMA
- defines elements that can appear in a document
- defines attributes that can appear in a document
- defines which elements are child elements
- defines the order of child elements
- defines the number of child elements
- defines whether an element is empty or can
include text - defines data types for elements and attributes
- defines default and fixed values for elements and
attributes
7XML SCHEMA vs DTD
- XML Schemas are extensible to future additions
- XML Schemas are richer and more useful than DTDs
- XML Schemas are written in XML
- XML Schemas support data types
- XML Schemas support namespaces
8DOM
The Document Object Model is a platform- and
language-neutral interface that will allow
programs and scripts to dynamically access and
update the content, structure and style of
documents. The document can be further processed
and the results of that processing can be
incorporated back into the presented page. This
is an overview of DOM-related materials here at
W3C and around the web.
9(No Transcript)
10XPATH
lt?xml version"1.0" encoding"ISO-8859-1"?gt
ltcataloggt ltcd country"USA"gt lttitlegtEmpire
Burlesquelt/titlegt ltartistgtBob Dylanlt/artistgt
ltpricegt10.90lt/pricegt lt/cdgt ltcd country"UK"gt
lttitlegtHide your heartlt/titlegt ltartistgtBonnie
Tylerlt/artistgt ltpricegt9.90lt/pricegt lt/cdgt ltcd
country"USA"gt lttitlegtGreatest Hitslt/titlegt
ltartistgtDolly Partonlt/artistgt ltpricegt9.90lt/pricegt
lt/cdgt lt/cataloggt /catalog /catalog/cdpricegt10.80
11Web teenused
Java ja ASP SOAP Web rakendus
12SOAP Request Näide
ltSOAP-Envelope xmlnsSOAP-ENVhttp//schemas.xmlso
ap.org/soap/envelopegt ltSOAP-Bodygt ltmGetAddress
xmlnsmhttp//example.org/GetAddressgt
ltparametersgt
ltparam0gtStevelt/param0gt
ltparam1gtWattlt/param1gt lt/parametersgt
lt/mGetAddressgt lt/SOAP-Bodygt lt/SOAP-Envelopegt
13The SOAP Response Example
ltSOAP-Envelope xmlnsSOAP-ENVhttp//schemas.xmlso
ap.org/soap/envelopegt ltSOAP-Bodygt
ltmGetAddress xmlnsmhttp//example.org/GetAddres
sgt ltresultsgt
ltresult0gt12th Floor, Ali Reza Towers, Medinah Rd,
Jeddah, KSA lt/result0gt
lt/resultsgt lt/mGetAddressgt lt/SOAP-Bodygt lt/
SOAP-Envelopegt
14(No Transcript)
15(No Transcript)
16(No Transcript)
17Questions