SlideShare a Scribd company logo
1
Introduction to XML
Chapter 1
Core XML / Chapter 1 / Slide 2 of 352
Chapter Objectives -1
 Discuss markup language
 List and explain drawbacks of HTML
 Discuss the architecture of XML documents
 List the benefits of XML
 Discuss Parser
Core XML / Chapter 1 / Slide 3 of 353
Chapter Objectives -2
 Build a complete XML Document:
 Character Data
 Comments
 Processing Instructions
 Entities
 General Entities
 Parameter Entities
 The DOCTYPE Declarations
Core XML / Chapter 1 / Slide 4 of 354
History of Markup
Documents recorded
using paper and pen
Typesetters formatting
documents
Tools used by typesetters
to format a document
Core XML / Chapter 1 / Slide 5 of 355
Markup Language
 A Markup language defines the rules that help to add
meaning to the content and structure of documents.
 They are classified as:
 Stylistic Markup – It determines the presentation of the
document
 Structure Markup – It defines the structure of the
document
 Semantic Markup – It determines the content of the
document
Core XML / Chapter 1 / Slide 6 of 356
SGML
 Generalized Markup Language (GML) is the
system of formatting documents.
 GML was fine-tuned and came to be known
as Standard Generalized Markup Language
(SGML).
 SGML is the source of origin of all markup
languages
Core XML / Chapter 1 / Slide 7 of 357
Features of SGML
 It describes markup language, which allows
authors to create their own tags that relate to
their content.
 It needs a separate file that will contain all
the rules for the language, for its
interpretation
 A SGML application is markup language
derived from SGML.
Core XML / Chapter 1 / Slide 8 of 358
HTML
 HTML is the most famous markup language derived
from SGML.
 It was created to mark up technical papers so that
they could be transferred across different platforms
for the scientific community.
 It is now also used by those non-scientific users who
are concerned about their document’s presentation.
Core XML / Chapter 1 / Slide 9 of 359
Drawbacks of HTML
 Fixed tag set
 Presentation technology does not relate to the
contents
 It is flat
 Clogging
 HTML is not international
 Data interchange is impossible
 Does not have a robust linking mechanism
 HTML is not reusable
Core XML / Chapter 1 / Slide 10 of 3510
HTML and XML code Examples
<UL>
<LI> TOM CRUISE
<UL>
<LI> CLIENT ID : 100
<LI> COMPANY : XYZ Corp.
<LI> Email : tom@usa.net
<LI> Phone : 3336767
<LI> Street Adress: 25th
St.
<LI> City : Toronto
<LI> State : Toronto
<LI> Zip : 20056
</UL>
</UL>
<Details>
<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>
HTML Code XML Code
Core XML / Chapter 1 / Slide 11 of 3511
XML -1
 XML stands for Extensible Markup Language.
 It overcomes all the drawbacks of HTML.
 It allows the user to define their own set of tags, and also
makes it possible for others (people or programs) to
understand it.
 It is more flexible than HTML.
 It inherits the features of SGML and combines it with the
features of HTML.
 It is a smaller version of SGML.
Core XML / Chapter 1 / Slide 12 of 3512
XML -2
 XML is a metalanguage and it describes other
languages.
 The data contained in an XML file can be displayed
in different ways.
 It can also be offered to other applications for further
processing.
 Style sheets help transform structured data into
different HTML views. This enables data to be
displayed on different browsers.
Core XML / Chapter 1 / Slide 13 of 3513
XML Architecture - 1
 XML supports three-tier architecture for handling
and manipulating data.
 It can be generated from existing databases using a
scalable three-tier model.
 XML tags represent the logical structure of data that
can be interpreted and used in various ways by
different applications.
 The middle-tier is used to access multiple databases
and translate data into XML.
Core XML / Chapter 1 / Slide 14 of 3514
XML Architecture -2
Core XML / Chapter 1 / Slide 15 of 3515
XML – A Universal data format
 HTML is a single markup language, but XML is a
family of markup languages.
 Any type of data can be easily defined in XML.
 XML is popular because it supports a wide range of
applications and is easy to use.
 XML has a structured data format, which allows it to
store complex data
Core XML / Chapter 1 / Slide 16 of 3516
Benefits of XML
 The three-tier architecture has easier
scalability and better security.
 The benefits of XML are classified into the
following:
 Business benefits
 Technological benefits
Core XML / Chapter 1 / Slide 17 of 3517
Business Benefits
 Information sharing:
 Allows businesses to define data formats in XML
 Provides tools to read, write and transform data between
XML and other formats
 XML inside a single application:
 Powerful, flexible and extensible language
 Content Delivery:
 Supports different users and channels, like digital TV,
phone, web and multimedia kiosks
Core XML / Chapter 1 / Slide 18 of 3518
Technological Benefits
Technological
Benefits
Re-use of data
Separation of data and
presentation
ExtensibilitySemantic
information
Core XML / Chapter 1 / Slide 19 of 3519
XML Document Structure
 An XML document is composed of sets of “entities”
identified by unique names.
 All documents begin with a root or document entity.
 Entities are aliases for more complex functions.
 Documents are logically composed of declarations,
elements, comments, character references, and
processing instructions.
Core XML / Chapter 1 / Slide 20 of 3520
Well formed and Valid Documents
 An XML document is considered as well formed, if a
minimum set of requirements defined in the XML
1.0 specification are satisfied.
 The requirements ensure that correct language terms
are used in the right manner .
 A valid XML document is a well-formed XML
document, which conforms to the rules of a
Document Type Definition (DTD).
 DTD defines the rules that an XML markup in the
XML document must follow.
Core XML / Chapter 1 / Slide 21 of 3521
Parsers - 1
 Parsers help the computer interpret an XML
file.
<?xml
version=“1.0”?
>
<nxn>
</nxn>
Editor with the
XML document
Parsed document
viewed in the browser
XML document parsed by the
parser
Their are two types of parsers:
Non Validating parser
Validating parser
Core XML / Chapter 1 / Slide 22 of 3522
Parsers - 2
XML
file
Other related
files (like DTD
file)
Parsers load the XML
and other related files
to check whether the
XML document is well
formed and valid
Data tree
Core XML / Chapter 1 / Slide 23 of 3523
Data versus Markup
<NAME> Tom Cruise </NAME>
Markup
Data
Core XML / Chapter 1 / Slide 24 of 3524
Creating an XML Document
 To create an XML document:
 State an XML declaration
 Create a root element
 Create the XML code
 Verify the document
Core XML / Chapter 1 / Slide 25 of 3525
Stating an XML Declaration
 Syntax
<?xml version=“1.0” standalone=“no” encoding=“UTP-8”?>
 ‘Standalone’ and ‘encoding’ attributes are
optional, only the version number is mandatory
 ‘Standalone’ – is the external declaration
 ‘Encoding’ - specifies the character encoding
used by the author
 XML 1.0 version is default
Core XML / Chapter 1 / Slide 26 of 3526
Creating a Root Element
 There can only be one root element
 It describes the function of the document
 Every XML document must have a root
element
Example
<?xml version=“1.0” standalone=“no” encoding=“UTP-8”?>
<BOOK>
</BOOK>
Core XML / Chapter 1 / Slide 27 of 3527
Creating the XML Code -1
 It is the process of creating our own elements
and attributes as required by our application.
 Elements are the basic units of XML content.
 Tags tell the user agent to do something to the
content encased between the start and end tag.Opening Tag Content Closing Tag
<TITLE> Aptech Ltd </TITLE>
Element
Parts of an
element
Core XML / Chapter 1 / Slide 28 of 3528
Creating the XML Code -2
 Rules govern the elements:
 At least one element required
 XML tags are case sensitive
 End the tags correctly
 Nest tags Properly
 Use legal tags
 Length of markup names
 Define Valid Attributes
Core XML / Chapter 1 / Slide 29 of 3529
Verify the document
 The document should follow the
XML rules; otherwise it will not be
read by the browser or by any other
XML reader
Core XML / Chapter 1 / Slide 30 of 3530
Comments
 This is information for the understanding of
the user, and is to be ignored by the
processor.
 Syntax
<!- - Write the comment here -- >
Example
<!-- don't show these
<NAME>KATE WINSLET</NAME>
<NAME>NICOLE KIDMAN</NAME>
<NAME>ARNOLD</NAME>
-->
<NAME>TOM CRUISE</NAME>
The example given will
display only the name TOM
CRUSIE, and others are
treated as comments.
Core XML / Chapter 1 / Slide 31 of 3531
Processing Instruction
 A processing information is a bit of information meant
for the application using the XML document.
 These instructions are directly passed to the application
using the parser.
 The XML declaration is also a processing agent.
<?xml:stylesheet type=“text/xsl”?>
Name of application Instruction information
Core XML / Chapter 1 / Slide 32 of 3532
Character Data
 The text between the start and end tags is
defined as ‘character data’.
 Character data may be any legal (Unicode).
 Character data is classified into:
 PCDATA
 CDATA
Core XML / Chapter 1 / Slide 33 of 3533
PCDATA
 It stands for parsed character data.
 PCDATA is text that will be parsed by a Parser.
 Tags inside the text will be treated as markup and
entities will be expanded.
Entity Name Character
&lt; <
&gt; >
&amp; &
&quot; "
&apos; '
Predefined entities
Core XML / Chapter 1 / Slide 34 of 3534
CDATA
 It means character data.
 It will not be parsed by the Parser.
 CDATA are used to make it convenient to include
large blocks of special characters.
 The character string ]]> is not allowed within a
CDATA block as it will signal the end of the CDATA
block.
<SAMPLE>
<![CDATA[<DOCUMENT>
<NAME>TOM CRUISE</NAME>
<EMAIL>tom@usa.com</EMAIL>
</DOCUMENT>]]>
</SAMPLE>
Example
Core XML / Chapter 1 / Slide 35 of 3535
Entities
 Entities are used to avoid typing long pieces of text
repeatedly within a document.
 There are two categories of 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 36 of 3536
Examples of Entities
An example of Parameter entities
< CLIENT = "&APTECH;" PRODUCT
= "&PRODUCT_ID;" QUANTITY
= "15">
 Entity declaration
 Syntax
%PARAMETER_ENTITY_NAME
;
 Example
%address;
An example of a General entity
<!ENTITY full_address " My
Address 12 Tenth Ave. Suite 12
Paris, France">
 Entity declaration
 Syntax
&ENTITY_NAME;
 Example
&address;
Core XML / Chapter 1 / Slide 37 of 3537
The DOCTYPE declarations
 The <!DOCTYPE [..]> declaration follows the XML
declaration in an XML document.
 Syntax
<?xml version="1.0"?>
<!DOCTYPE myDoc [
...declare the entities here....
<myDoc>
...body of the document....
</myDoc>
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 38 of 3538
Attributes
 An attribute gives information about an
element.
 Attributes are embedded in the element start
tag.
 An attribute consists of an attribute name
and attribute value.
Example
<TV count="8">SONY</TV>
<LAPTOP count="10">IBM</LAPTOP>
Core XML / Chapter 1 / Slide 39 of 3539
Summary-1
 A markup language defines a set of rules that adds
meaning to the content and structure of documents
 XML is extensible, which means that we can define our
own set of tags, and make it possible for other parties
(people or programs) to know and understand these tags.
This makes XML much more flexible than HTML
 XML inherits features from SGML and includes the
features of HTML. XML can be generated from existing
databases using a scalable three-tier model. XML-based
data does not contain information about how data should
be displayed
 An XML document is composed of a set of “entities”
identified by unique names
Core XML / Chapter 1 / Slide 40 of 3540
Summary-2
 A well-formed document is one that conforms to the basic
rules of XML; a valid document is a well-formed
document that conforms to the rules of a DTD (Document
Type Definition)
 The parser helps the computer to interpret an XML file
 Steps involved in the building of an XML document are:
 Stating an XML declaration
 Creating a root element
 Creating the XML code
 Verifying the document
 Character data is classified into PCDATA and CDATA
Core XML / Chapter 1 / Slide 41 of 3541
Summary-3
 Entities are used to avoid typing long pieces of text repeatedly
in a document. The two types of entities are:
 General entities
 Parameter entities
 The <!DOCTYPE […]> declaration follows the XML
declaration in an XML document.
 An attribute gives information about an element

More Related Content

What's hot

XSLT
XSLTXSLT
Xml presentation
Xml presentationXml presentation
Xml presentation
Miguel Angel Teheran Garcia
 
XML
XMLXML
XML
XMLXML
XML Introduction
XML IntroductionXML Introduction
XML Introduction
Bikash chhetri
 
XML
XMLXML
JSON: The Basics
JSON: The BasicsJSON: The Basics
JSON: The Basics
Jeff Fox
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
Vijay Mishra
 
XML-Extensible Markup Language
XML-Extensible Markup Language XML-Extensible Markup Language
XML-Extensible Markup Language
Ann Joseph
 
XML Document Object Model (DOM)
XML Document Object Model (DOM)XML Document Object Model (DOM)
XML Document Object Model (DOM)
BOSS Webtech
 
XML Schema
XML SchemaXML Schema
XML Schema
yht4ever
 
XML Schema
XML SchemaXML Schema
XML Schema
Kumar
 
Overview of XSL, XPath and XSL-FO
Overview of XSL, XPath and XSL-FOOverview of XSL, XPath and XSL-FO
Overview of XSL, XPath and XSL-FOSuite Solutions
 
Xml parsing
Xml parsingXml parsing
Xml parsing
Malintha Adikari
 
Xml databases
Xml databasesXml databases
Xml databases
Srinivasan R
 
XSLT.ppt
XSLT.pptXSLT.ppt
XSLT.ppt
KGSCSEPSGCT
 
XML, DTD & XSD Overview
XML, DTD & XSD OverviewXML, DTD & XSD Overview
XML, DTD & XSD Overview
Pradeep Rapolu
 
PL/SQL Fundamentals I
PL/SQL Fundamentals IPL/SQL Fundamentals I
PL/SQL Fundamentals I
Nick Buytaert
 

What's hot (20)

XSLT
XSLTXSLT
XSLT
 
Xml presentation
Xml presentationXml presentation
Xml presentation
 
XML
XMLXML
XML
 
XML
XMLXML
XML
 
XML Introduction
XML IntroductionXML Introduction
XML Introduction
 
XML
XMLXML
XML
 
JSON: The Basics
JSON: The BasicsJSON: The Basics
JSON: The Basics
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
XML-Extensible Markup Language
XML-Extensible Markup Language XML-Extensible Markup Language
XML-Extensible Markup Language
 
XML Document Object Model (DOM)
XML Document Object Model (DOM)XML Document Object Model (DOM)
XML Document Object Model (DOM)
 
XML Schema
XML SchemaXML Schema
XML Schema
 
Json
JsonJson
Json
 
XML Schema
XML SchemaXML Schema
XML Schema
 
Overview of XSL, XPath and XSL-FO
Overview of XSL, XPath and XSL-FOOverview of XSL, XPath and XSL-FO
Overview of XSL, XPath and XSL-FO
 
Xml parsing
Xml parsingXml parsing
Xml parsing
 
Xml
XmlXml
Xml
 
Xml databases
Xml databasesXml databases
Xml databases
 
XSLT.ppt
XSLT.pptXSLT.ppt
XSLT.ppt
 
XML, DTD & XSD Overview
XML, DTD & XSD OverviewXML, DTD & XSD Overview
XML, DTD & XSD Overview
 
PL/SQL Fundamentals I
PL/SQL Fundamentals IPL/SQL Fundamentals I
PL/SQL Fundamentals I
 

Viewers also liked

IMT Lecture: Transfer of Technology from.R+D MM-Biztel-29Jul09
IMT Lecture: Transfer of Technology from.R+D MM-Biztel-29Jul09IMT Lecture: Transfer of Technology from.R+D MM-Biztel-29Jul09
IMT Lecture: Transfer of Technology from.R+D MM-Biztel-29Jul09Djadja Sardjana
 
IP Licensing
IP Licensing IP Licensing
IP Licensing
BananaIP Counsels
 
Biotechnology regulatory process and agencies, legal aspects, IPR
Biotechnology regulatory process and agencies, legal aspects, IPRBiotechnology regulatory process and agencies, legal aspects, IPR
Biotechnology regulatory process and agencies, legal aspects, IPR
Kashyap Kumar
 
Trade secrets vs. confidential information
Trade secrets vs. confidential informationTrade secrets vs. confidential information
Trade secrets vs. confidential informationAltacit Global
 
Licensing & franchising
Licensing & franchisingLicensing & franchising
Licensing & franchisingSilvia Aguilar
 
Intellectual Capital Management
Intellectual Capital ManagementIntellectual Capital Management
Intellectual Capital Management
Elijah Ezendu
 
Media and Information Literacy (MIL) - Intellectual Property, Fair Use, and C...
Media and Information Literacy (MIL) - Intellectual Property, Fair Use, and C...Media and Information Literacy (MIL) - Intellectual Property, Fair Use, and C...
Media and Information Literacy (MIL) - Intellectual Property, Fair Use, and C...
Arniel Ping
 
Intellectual Capital: Define, Understand and Capture It
Intellectual Capital: Define, Understand and Capture ItIntellectual Capital: Define, Understand and Capture It
Intellectual Capital: Define, Understand and Capture It
Smarter-Companies
 
LICENSING & FRANCHISING
LICENSING & FRANCHISINGLICENSING & FRANCHISING
LICENSING & FRANCHISINGSilvia Aguilar
 

Viewers also liked (12)

IMT Lecture: Transfer of Technology from.R+D MM-Biztel-29Jul09
IMT Lecture: Transfer of Technology from.R+D MM-Biztel-29Jul09IMT Lecture: Transfer of Technology from.R+D MM-Biztel-29Jul09
IMT Lecture: Transfer of Technology from.R+D MM-Biztel-29Jul09
 
IP Licensing
IP Licensing IP Licensing
IP Licensing
 
Biotechnology regulatory process and agencies, legal aspects, IPR
Biotechnology regulatory process and agencies, legal aspects, IPRBiotechnology regulatory process and agencies, legal aspects, IPR
Biotechnology regulatory process and agencies, legal aspects, IPR
 
Trade secrets vs. confidential information
Trade secrets vs. confidential informationTrade secrets vs. confidential information
Trade secrets vs. confidential information
 
Intellectual Capital
Intellectual CapitalIntellectual Capital
Intellectual Capital
 
Licensing & franchising
Licensing & franchisingLicensing & franchising
Licensing & franchising
 
Intellectual Capital Management
Intellectual Capital ManagementIntellectual Capital Management
Intellectual Capital Management
 
Ppt On Sm
Ppt On SmPpt On Sm
Ppt On Sm
 
Media and Information Literacy (MIL) - Intellectual Property, Fair Use, and C...
Media and Information Literacy (MIL) - Intellectual Property, Fair Use, and C...Media and Information Literacy (MIL) - Intellectual Property, Fair Use, and C...
Media and Information Literacy (MIL) - Intellectual Property, Fair Use, and C...
 
Intellectual Capital: Define, Understand and Capture It
Intellectual Capital: Define, Understand and Capture ItIntellectual Capital: Define, Understand and Capture It
Intellectual Capital: Define, Understand and Capture It
 
Licensing,Ppt
Licensing,PptLicensing,Ppt
Licensing,Ppt
 
LICENSING & FRANCHISING
LICENSING & FRANCHISINGLICENSING & FRANCHISING
LICENSING & FRANCHISING
 

Similar to Introduction to XML

Xml theory 2005_[ngohaianh.info]_1_introduction-to-xml
Xml theory 2005_[ngohaianh.info]_1_introduction-to-xmlXml theory 2005_[ngohaianh.info]_1_introduction-to-xml
Xml theory 2005_[ngohaianh.info]_1_introduction-to-xml
Ông Thông
 
XML-Unit 1.ppt
XML-Unit 1.pptXML-Unit 1.ppt
XML-Unit 1.ppt
ssuseree7dcd
 
Module 5 XML Notes.pdf
Module 5 XML Notes.pdfModule 5 XML Notes.pdf
Module 5 XML Notes.pdf
ssuser21721b
 
IT6801-Service Oriented Architecture- UNIT-I notes
IT6801-Service Oriented Architecture- UNIT-I notesIT6801-Service Oriented Architecture- UNIT-I notes
IT6801-Service Oriented Architecture- UNIT-I notes
Ramco Institute of Technology, Rajapalayam, Tamilnadu, India
 
Introduction to xml
Introduction to xmlIntroduction to xml
Introduction to xmlsoumya
 
Full xml
Full xmlFull xml
M.FLORENCE DAYANA WEB DESIGN -Unit 5 XML
M.FLORENCE DAYANA WEB DESIGN -Unit 5   XMLM.FLORENCE DAYANA WEB DESIGN -Unit 5   XML
M.FLORENCE DAYANA WEB DESIGN -Unit 5 XML
Dr.Florence Dayana
 
IT6801-Service Oriented Architecture
IT6801-Service Oriented ArchitectureIT6801-Service Oriented Architecture
IT6801-Service Oriented Architecture
Madhu Amarnath
 
XML - Extensive Markup Language
XML - Extensive Markup LanguageXML - Extensive Markup Language
XML - Extensive Markup Language
wahidullah mudaser
 
Unit 5 xml (1)
Unit 5   xml (1)Unit 5   xml (1)
Unit 5 xml (1)
manochitra10
 
Session 1
Session 1Session 1
XML Introduction
XML IntroductionXML Introduction
XML Introduction
Marco Bresciani
 
xml introduction in web technologies subject
xml introduction in web technologies subjectxml introduction in web technologies subject
xml introduction in web technologies subject
UdayKumar693239
 
01 sm3 xml_xp_01
01 sm3 xml_xp_0101 sm3 xml_xp_01
01 sm3 xml_xp_01Niit Care
 
XML
XMLXML
Sgml and xml
Sgml and xmlSgml and xml
Sgml and xml
Jaya Kumari
 
Oracle soa xml faq
Oracle soa xml faqOracle soa xml faq
Oracle soa xml faq
xavier john
 

Similar to Introduction to XML (20)

Xml theory 2005_[ngohaianh.info]_1_introduction-to-xml
Xml theory 2005_[ngohaianh.info]_1_introduction-to-xmlXml theory 2005_[ngohaianh.info]_1_introduction-to-xml
Xml theory 2005_[ngohaianh.info]_1_introduction-to-xml
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
XML-Unit 1.ppt
XML-Unit 1.pptXML-Unit 1.ppt
XML-Unit 1.ppt
 
Module 5 XML Notes.pdf
Module 5 XML Notes.pdfModule 5 XML Notes.pdf
Module 5 XML Notes.pdf
 
IT6801-Service Oriented Architecture- UNIT-I notes
IT6801-Service Oriented Architecture- UNIT-I notesIT6801-Service Oriented Architecture- UNIT-I notes
IT6801-Service Oriented Architecture- UNIT-I notes
 
Introduction to xml
Introduction to xmlIntroduction to xml
Introduction to xml
 
Full xml
Full xmlFull xml
Full xml
 
Intro to xml
Intro to xmlIntro to xml
Intro to xml
 
M.FLORENCE DAYANA WEB DESIGN -Unit 5 XML
M.FLORENCE DAYANA WEB DESIGN -Unit 5   XMLM.FLORENCE DAYANA WEB DESIGN -Unit 5   XML
M.FLORENCE DAYANA WEB DESIGN -Unit 5 XML
 
IT6801-Service Oriented Architecture
IT6801-Service Oriented ArchitectureIT6801-Service Oriented Architecture
IT6801-Service Oriented Architecture
 
XML - Extensive Markup Language
XML - Extensive Markup LanguageXML - Extensive Markup Language
XML - Extensive Markup Language
 
Unit 5 xml (1)
Unit 5   xml (1)Unit 5   xml (1)
Unit 5 xml (1)
 
Session 1
Session 1Session 1
Session 1
 
XML Introduction
XML IntroductionXML Introduction
XML Introduction
 
xml introduction in web technologies subject
xml introduction in web technologies subjectxml introduction in web technologies subject
xml introduction in web technologies subject
 
01 sm3 xml_xp_01
01 sm3 xml_xp_0101 sm3 xml_xp_01
01 sm3 xml_xp_01
 
XML
XMLXML
XML
 
XML
XMLXML
XML
 
Sgml and xml
Sgml and xmlSgml and xml
Sgml and xml
 
Oracle soa xml faq
Oracle soa xml faqOracle soa xml faq
Oracle soa xml faq
 

More from Bình Trọng Án

A Developer's Guide to CQRS Using .NET Core and MediatR
A Developer's Guide to CQRS Using .NET Core and MediatRA Developer's Guide to CQRS Using .NET Core and MediatR
A Developer's Guide to CQRS Using .NET Core and MediatR
Bình Trọng Án
 
Nếu con em vị nói lắp
Nếu con em vị nói lắpNếu con em vị nói lắp
Nếu con em vị nói lắp
Bình Trọng Án
 
Bài giảng chuyên đề - Lê Minh Hoàng
Bài giảng chuyên đề - Lê Minh HoàngBài giảng chuyên đề - Lê Minh Hoàng
Bài giảng chuyên đề - Lê Minh Hoàng
Bình Trọng Án
 
Tìm hiểu về NodeJs
Tìm hiểu về NodeJsTìm hiểu về NodeJs
Tìm hiểu về NodeJs
Bình Trọng Án
 
Clean code-v2.2
Clean code-v2.2Clean code-v2.2
Clean code-v2.2
Bình Trọng Án
 
Các câu chuyện toán học - Tập 3: Khẳng định trong phủ định
Các câu chuyện toán học - Tập 3: Khẳng định trong phủ địnhCác câu chuyện toán học - Tập 3: Khẳng định trong phủ định
Các câu chuyện toán học - Tập 3: Khẳng định trong phủ định
Bình Trọng Án
 
Luyện dịch Việt Anh
Luyện dịch Việt AnhLuyện dịch Việt Anh
Luyện dịch Việt Anh
Bình Trọng Án
 
2816 mcsa--part-11--domain-c111ntroller--join-domain-1
2816 mcsa--part-11--domain-c111ntroller--join-domain-12816 mcsa--part-11--domain-c111ntroller--join-domain-1
2816 mcsa--part-11--domain-c111ntroller--join-domain-1Bình Trọng Án
 
LinQ to XML
LinQ to XMLLinQ to XML
LinQ to XML
Bình Trọng Án
 
Chuyên đề group policy
Chuyên đề group policyChuyên đề group policy
Chuyên đề group policy
Bình Trọng Án
 
Chapter 4 xml schema
Chapter 4   xml schemaChapter 4   xml schema
Chapter 4 xml schema
Bình Trọng Án
 
Tỷ lệ vàng - một phát hiện vĩ đại của hình học
Tỷ lệ vàng - một phát hiện vĩ đại của hình họcTỷ lệ vàng - một phát hiện vĩ đại của hình học
Tỷ lệ vàng - một phát hiện vĩ đại của hình học
Bình Trọng Án
 
Attributes & .NET components
Attributes & .NET componentsAttributes & .NET components
Attributes & .NET components
Bình Trọng Án
 
Ajax Control ToolKit
Ajax Control ToolKitAjax Control ToolKit
Ajax Control ToolKit
Bình Trọng Án
 
Linq intro
Linq introLinq intro
Linq intro
Bình Trọng Án
 
Sách chữa tật nói lắp Version 1.0 beta
Sách chữa tật nói lắp Version 1.0 betaSách chữa tật nói lắp Version 1.0 beta
Sách chữa tật nói lắp Version 1.0 beta
Bình Trọng Án
 
Mô hình 3 lớp
Mô hình 3 lớpMô hình 3 lớp
Mô hình 3 lớp
Bình Trọng Án
 
Xsd examples
Xsd examplesXsd examples
Xsd examples
Bình Trọng Án
 
Displaying XML Documents Using CSS and XSL
Displaying XML Documents Using CSS and XSLDisplaying XML Documents Using CSS and XSL
Displaying XML Documents Using CSS and XSLBình Trọng Án
 

More from Bình Trọng Án (20)

A Developer's Guide to CQRS Using .NET Core and MediatR
A Developer's Guide to CQRS Using .NET Core and MediatRA Developer's Guide to CQRS Using .NET Core and MediatR
A Developer's Guide to CQRS Using .NET Core and MediatR
 
Nếu con em vị nói lắp
Nếu con em vị nói lắpNếu con em vị nói lắp
Nếu con em vị nói lắp
 
Bài giảng chuyên đề - Lê Minh Hoàng
Bài giảng chuyên đề - Lê Minh HoàngBài giảng chuyên đề - Lê Minh Hoàng
Bài giảng chuyên đề - Lê Minh Hoàng
 
Tìm hiểu về NodeJs
Tìm hiểu về NodeJsTìm hiểu về NodeJs
Tìm hiểu về NodeJs
 
Clean code-v2.2
Clean code-v2.2Clean code-v2.2
Clean code-v2.2
 
Các câu chuyện toán học - Tập 3: Khẳng định trong phủ định
Các câu chuyện toán học - Tập 3: Khẳng định trong phủ địnhCác câu chuyện toán học - Tập 3: Khẳng định trong phủ định
Các câu chuyện toán học - Tập 3: Khẳng định trong phủ định
 
Luyện dịch Việt Anh
Luyện dịch Việt AnhLuyện dịch Việt Anh
Luyện dịch Việt Anh
 
2816 mcsa--part-11--domain-c111ntroller--join-domain-1
2816 mcsa--part-11--domain-c111ntroller--join-domain-12816 mcsa--part-11--domain-c111ntroller--join-domain-1
2816 mcsa--part-11--domain-c111ntroller--join-domain-1
 
LinQ to XML
LinQ to XMLLinQ to XML
LinQ to XML
 
Chuyên đề group policy
Chuyên đề group policyChuyên đề group policy
Chuyên đề group policy
 
Chapter 4 xml schema
Chapter 4   xml schemaChapter 4   xml schema
Chapter 4 xml schema
 
Tỷ lệ vàng - một phát hiện vĩ đại của hình học
Tỷ lệ vàng - một phát hiện vĩ đại của hình họcTỷ lệ vàng - một phát hiện vĩ đại của hình học
Tỷ lệ vàng - một phát hiện vĩ đại của hình học
 
Attributes & .NET components
Attributes & .NET componentsAttributes & .NET components
Attributes & .NET components
 
Ajax Control ToolKit
Ajax Control ToolKitAjax Control ToolKit
Ajax Control ToolKit
 
Linq intro
Linq introLinq intro
Linq intro
 
Sách chữa tật nói lắp Version 1.0 beta
Sách chữa tật nói lắp Version 1.0 betaSách chữa tật nói lắp Version 1.0 beta
Sách chữa tật nói lắp Version 1.0 beta
 
Mô hình 3 lớp
Mô hình 3 lớpMô hình 3 lớp
Mô hình 3 lớp
 
Xsd examples
Xsd examplesXsd examples
Xsd examples
 
Displaying XML Documents Using CSS and XSL
Displaying XML Documents Using CSS and XSLDisplaying XML Documents Using CSS and XSL
Displaying XML Documents Using CSS and XSL
 
Tp2
Tp2Tp2
Tp2
 

Recently uploaded

Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 

Recently uploaded (20)

Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 

Introduction to XML

  • 2. Core XML / Chapter 1 / Slide 2 of 352 Chapter Objectives -1  Discuss markup language  List and explain drawbacks of HTML  Discuss the architecture of XML documents  List the benefits of XML  Discuss Parser
  • 3. Core XML / Chapter 1 / Slide 3 of 353 Chapter Objectives -2  Build a complete XML Document:  Character Data  Comments  Processing Instructions  Entities  General Entities  Parameter Entities  The DOCTYPE Declarations
  • 4. Core XML / Chapter 1 / Slide 4 of 354 History of Markup Documents recorded using paper and pen Typesetters formatting documents Tools used by typesetters to format a document
  • 5. Core XML / Chapter 1 / Slide 5 of 355 Markup Language  A Markup language defines the rules that help to add meaning to the content and structure of documents.  They are classified as:  Stylistic Markup – It determines the presentation of the document  Structure Markup – It defines the structure of the document  Semantic Markup – It determines the content of the document
  • 6. Core XML / Chapter 1 / Slide 6 of 356 SGML  Generalized Markup Language (GML) is the system of formatting documents.  GML was fine-tuned and came to be known as Standard Generalized Markup Language (SGML).  SGML is the source of origin of all markup languages
  • 7. Core XML / Chapter 1 / Slide 7 of 357 Features of SGML  It describes markup language, which allows authors to create their own tags that relate to their content.  It needs a separate file that will contain all the rules for the language, for its interpretation  A SGML application is markup language derived from SGML.
  • 8. Core XML / Chapter 1 / Slide 8 of 358 HTML  HTML is the most famous markup language derived from SGML.  It was created to mark up technical papers so that they could be transferred across different platforms for the scientific community.  It is now also used by those non-scientific users who are concerned about their document’s presentation.
  • 9. Core XML / Chapter 1 / Slide 9 of 359 Drawbacks of HTML  Fixed tag set  Presentation technology does not relate to the contents  It is flat  Clogging  HTML is not international  Data interchange is impossible  Does not have a robust linking mechanism  HTML is not reusable
  • 10. Core XML / Chapter 1 / Slide 10 of 3510 HTML and XML code Examples <UL> <LI> TOM CRUISE <UL> <LI> CLIENT ID : 100 <LI> COMPANY : XYZ Corp. <LI> Email : tom@usa.net <LI> Phone : 3336767 <LI> Street Adress: 25th St. <LI> City : Toronto <LI> State : Toronto <LI> Zip : 20056 </UL> </UL> <Details> <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> HTML Code XML Code
  • 11. Core XML / Chapter 1 / Slide 11 of 3511 XML -1  XML stands for Extensible Markup Language.  It overcomes all the drawbacks of HTML.  It allows the user to define their own set of tags, and also makes it possible for others (people or programs) to understand it.  It is more flexible than HTML.  It inherits the features of SGML and combines it with the features of HTML.  It is a smaller version of SGML.
  • 12. Core XML / Chapter 1 / Slide 12 of 3512 XML -2  XML is a metalanguage and it describes other languages.  The data contained in an XML file can be displayed in different ways.  It can also be offered to other applications for further processing.  Style sheets help transform structured data into different HTML views. This enables data to be displayed on different browsers.
  • 13. Core XML / Chapter 1 / Slide 13 of 3513 XML Architecture - 1  XML supports three-tier architecture for handling and manipulating data.  It can be generated from existing databases using a scalable three-tier model.  XML tags represent the logical structure of data that can be interpreted and used in various ways by different applications.  The middle-tier is used to access multiple databases and translate data into XML.
  • 14. Core XML / Chapter 1 / Slide 14 of 3514 XML Architecture -2
  • 15. Core XML / Chapter 1 / Slide 15 of 3515 XML – A Universal data format  HTML is a single markup language, but XML is a family of markup languages.  Any type of data can be easily defined in XML.  XML is popular because it supports a wide range of applications and is easy to use.  XML has a structured data format, which allows it to store complex data
  • 16. Core XML / Chapter 1 / Slide 16 of 3516 Benefits of XML  The three-tier architecture has easier scalability and better security.  The benefits of XML are classified into the following:  Business benefits  Technological benefits
  • 17. Core XML / Chapter 1 / Slide 17 of 3517 Business Benefits  Information sharing:  Allows businesses to define data formats in XML  Provides tools to read, write and transform data between XML and other formats  XML inside a single application:  Powerful, flexible and extensible language  Content Delivery:  Supports different users and channels, like digital TV, phone, web and multimedia kiosks
  • 18. Core XML / Chapter 1 / Slide 18 of 3518 Technological Benefits Technological Benefits Re-use of data Separation of data and presentation ExtensibilitySemantic information
  • 19. Core XML / Chapter 1 / Slide 19 of 3519 XML Document Structure  An XML document is composed of sets of “entities” identified by unique names.  All documents begin with a root or document entity.  Entities are aliases for more complex functions.  Documents are logically composed of declarations, elements, comments, character references, and processing instructions.
  • 20. Core XML / Chapter 1 / Slide 20 of 3520 Well formed and Valid Documents  An XML document is considered as well formed, if a minimum set of requirements defined in the XML 1.0 specification are satisfied.  The requirements ensure that correct language terms are used in the right manner .  A valid XML document is a well-formed XML document, which conforms to the rules of a Document Type Definition (DTD).  DTD defines the rules that an XML markup in the XML document must follow.
  • 21. Core XML / Chapter 1 / Slide 21 of 3521 Parsers - 1  Parsers help the computer interpret an XML file. <?xml version=“1.0”? > <nxn> </nxn> Editor with the XML document Parsed document viewed in the browser XML document parsed by the parser Their are two types of parsers: Non Validating parser Validating parser
  • 22. Core XML / Chapter 1 / Slide 22 of 3522 Parsers - 2 XML file Other related files (like DTD file) Parsers load the XML and other related files to check whether the XML document is well formed and valid Data tree
  • 23. Core XML / Chapter 1 / Slide 23 of 3523 Data versus Markup <NAME> Tom Cruise </NAME> Markup Data
  • 24. Core XML / Chapter 1 / Slide 24 of 3524 Creating an XML Document  To create an XML document:  State an XML declaration  Create a root element  Create the XML code  Verify the document
  • 25. Core XML / Chapter 1 / Slide 25 of 3525 Stating an XML Declaration  Syntax <?xml version=“1.0” standalone=“no” encoding=“UTP-8”?>  ‘Standalone’ and ‘encoding’ attributes are optional, only the version number is mandatory  ‘Standalone’ – is the external declaration  ‘Encoding’ - specifies the character encoding used by the author  XML 1.0 version is default
  • 26. Core XML / Chapter 1 / Slide 26 of 3526 Creating a Root Element  There can only be one root element  It describes the function of the document  Every XML document must have a root element Example <?xml version=“1.0” standalone=“no” encoding=“UTP-8”?> <BOOK> </BOOK>
  • 27. Core XML / Chapter 1 / Slide 27 of 3527 Creating the XML Code -1  It is the process of creating our own elements and attributes as required by our application.  Elements are the basic units of XML content.  Tags tell the user agent to do something to the content encased between the start and end tag.Opening Tag Content Closing Tag <TITLE> Aptech Ltd </TITLE> Element Parts of an element
  • 28. Core XML / Chapter 1 / Slide 28 of 3528 Creating the XML Code -2  Rules govern the elements:  At least one element required  XML tags are case sensitive  End the tags correctly  Nest tags Properly  Use legal tags  Length of markup names  Define Valid Attributes
  • 29. Core XML / Chapter 1 / Slide 29 of 3529 Verify the document  The document should follow the XML rules; otherwise it will not be read by the browser or by any other XML reader
  • 30. Core XML / Chapter 1 / Slide 30 of 3530 Comments  This is information for the understanding of the user, and is to be ignored by the processor.  Syntax <!- - Write the comment here -- > Example <!-- don't show these <NAME>KATE WINSLET</NAME> <NAME>NICOLE KIDMAN</NAME> <NAME>ARNOLD</NAME> --> <NAME>TOM CRUISE</NAME> The example given will display only the name TOM CRUSIE, and others are treated as comments.
  • 31. Core XML / Chapter 1 / Slide 31 of 3531 Processing Instruction  A processing information is a bit of information meant for the application using the XML document.  These instructions are directly passed to the application using the parser.  The XML declaration is also a processing agent. <?xml:stylesheet type=“text/xsl”?> Name of application Instruction information
  • 32. Core XML / Chapter 1 / Slide 32 of 3532 Character Data  The text between the start and end tags is defined as ‘character data’.  Character data may be any legal (Unicode).  Character data is classified into:  PCDATA  CDATA
  • 33. Core XML / Chapter 1 / Slide 33 of 3533 PCDATA  It stands for parsed character data.  PCDATA is text that will be parsed by a Parser.  Tags inside the text will be treated as markup and entities will be expanded. Entity Name Character &lt; < &gt; > &amp; & &quot; " &apos; ' Predefined entities
  • 34. Core XML / Chapter 1 / Slide 34 of 3534 CDATA  It means character data.  It will not be parsed by the Parser.  CDATA are used to make it convenient to include large blocks of special characters.  The character string ]]> is not allowed within a CDATA block as it will signal the end of the CDATA block. <SAMPLE> <![CDATA[<DOCUMENT> <NAME>TOM CRUISE</NAME> <EMAIL>tom@usa.com</EMAIL> </DOCUMENT>]]> </SAMPLE> Example
  • 35. Core XML / Chapter 1 / Slide 35 of 3535 Entities  Entities are used to avoid typing long pieces of text repeatedly within a document.  There are two categories of 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">
  • 36. Core XML / Chapter 1 / Slide 36 of 3536 Examples of Entities An example of Parameter entities < CLIENT = "&APTECH;" PRODUCT = "&PRODUCT_ID;" QUANTITY = "15">  Entity declaration  Syntax %PARAMETER_ENTITY_NAME ;  Example %address; An example of a General entity <!ENTITY full_address " My Address 12 Tenth Ave. Suite 12 Paris, France">  Entity declaration  Syntax &ENTITY_NAME;  Example &address;
  • 37. Core XML / Chapter 1 / Slide 37 of 3537 The DOCTYPE declarations  The <!DOCTYPE [..]> declaration follows the XML declaration in an XML document.  Syntax <?xml version="1.0"?> <!DOCTYPE myDoc [ ...declare the entities here.... <myDoc> ...body of the document.... </myDoc> Example <!DOCTYPE CUSTOMERS [ <!ENTITY firstFloor "15 Downing St Floor 1"> <!ENTITY secondFloor "15 Downing St Floor 2"> <!ENTITY thirdFloor "15 Downing St Floor 3"> ]>
  • 38. Core XML / Chapter 1 / Slide 38 of 3538 Attributes  An attribute gives information about an element.  Attributes are embedded in the element start tag.  An attribute consists of an attribute name and attribute value. Example <TV count="8">SONY</TV> <LAPTOP count="10">IBM</LAPTOP>
  • 39. Core XML / Chapter 1 / Slide 39 of 3539 Summary-1  A markup language defines a set of rules that adds meaning to the content and structure of documents  XML is extensible, which means that we can define our own set of tags, and make it possible for other parties (people or programs) to know and understand these tags. This makes XML much more flexible than HTML  XML inherits features from SGML and includes the features of HTML. XML can be generated from existing databases using a scalable three-tier model. XML-based data does not contain information about how data should be displayed  An XML document is composed of a set of “entities” identified by unique names
  • 40. Core XML / Chapter 1 / Slide 40 of 3540 Summary-2  A well-formed document is one that conforms to the basic rules of XML; a valid document is a well-formed document that conforms to the rules of a DTD (Document Type Definition)  The parser helps the computer to interpret an XML file  Steps involved in the building of an XML document are:  Stating an XML declaration  Creating a root element  Creating the XML code  Verifying the document  Character data is classified into PCDATA and CDATA
  • 41. Core XML / Chapter 1 / Slide 41 of 3541 Summary-3  Entities are used to avoid typing long pieces of text repeatedly in a document. The two types of entities are:  General entities  Parameter entities  The <!DOCTYPE […]> declaration follows the XML declaration in an XML document.  An attribute gives information about an element