Documente Academic
Documente Profesional
Documente Cultură
Chapter 1
Chapter Objectives -1
Chapter Objectives -2
History of Markup
Documents recorded
using paper and pen
Typesetters formatting
documents
Markup Language
SGML
Features of SGML
HTML
Drawbacks of HTML
<UL>
HTML
<LI> TOM CRUISE
Code
<UL>
<LI>
<LI>
<LI>
<LI>
<LI>
St.
<LI>
<LI>
<LI>
</UL>
</UL>
CLIENT ID : 100
COMPANY : XYZ Corp.
Email : tom@usa.net
Phone : 3336767
Street Adress: 25th
City : Toronto
State : Toronto
Zip : 20056
<Details>
Code
<CONTACT>
<PERSON_NAME>TOM CRUISE
</PERSON_NAME>
<ID>
100
</ID>
<Company>XYZ Corp. </Company>
<Email>
tom@usa.net</Email>
<Phone> 3336767 </Phone>
<Street> 25th St.
</Street>
<City> Toronto
</City>
<State> Toronto
</State>
<ZIP> 20056
</ZIP>
</CONTACT>
</Details>
Core XML / Chapter 1 / Slide 10 of 35
XML -1
XML -2
XML Architecture - 1
XML Architecture -2
Benefits of XML
Business Benefits
Information sharing:
Content Delivery:
Technological Benefits
Separation of data
and presentation
Semantic
information
Technological
Benefits
Extensibility
Re-use of data
Parsers - 1
Parsed document
viewed in the browser
Parsers - 2
XML
file
Parsers load the XML
and other related files
to check whether the
XML document is
well formed and valid
Other related
files (like
DTD file)
Data tree
<NAME>
</NAME>
Tom Cruise
Data
Creating an XML
Document
Stating an XML
Declaration
Syntax
Example
<?xml version=1.0 standalone=no encoding=UTP-8?>
<BOOK>
</BOOK>
Core XML / Chapter 1 / Slide 26 of 35
Parts of an
element
<TITLE>
Content
Closing Tag
Aptech Ltd
</TITLE>
Element
Core XML / Chapter 1 / Slide 27 of 35
Comments
Example
<!-- don't show these
<NAME>KATE WINSLET</NAME>
<NAME>NICOLE KIDMAN</NAME>
<NAME>ARNOLD</NAME>
-->
<NAME>TOM CRUISE</NAME>
Processing Instruction
Instruction information
Core XML / Chapter 1 / Slide 31 of 35
Character Data
PCDATA
Character
<
>
&
"
'
Predefined entities
CDATA
Example
<SAMPLE>
<![CDATA[<DOCUMENT>
<NAME>TOM CRUISE</NAME>
<EMAIL>tom@usa.com</EMAIL>
</DOCUMENT>]]>
</SAMPLE>
Core XML / Chapter 1 / Slide 34 of 35
Entities
General entities
Syntax
<!ENTITY ADDRESS "text that is to be represented
by an entity">
Parameter entities
Syntax
<!ENTITY % ADDRESS "text that is to be represented by an entity">
Core XML / Chapter 1 / Slide 35 of 35
Examples of Entities
An example of Parameter entities
< CLIENT = "&APTECH;"
PRODUCT = "&PRODUCT_ID;"
QUANTITY = "15">
Entity declaration
Syntax
%PARAMETER_ENTITY_NAM
E;
Example
%address;
Example
<!DOCTYPE CUSTOMERS [
<!ENTITY firstFloor "15 Downing St Floor 1">
<!ENTITY secondFloor "15 Downing St Floor 2">
<!ENTITY thirdFloor "15 Downing St Floor 3">
]>
Core XML / Chapter 1 / Slide 37 of 35
Attributes
Example
<TV count="8">SONY</TV>
<LAPTOP count="10">IBM</LAPTOP>
Core XML / Chapter 1 / Slide 38 of 35
Summary-1
Summary-2
Summary-3