XML (Extensible Markup Language) is designed for carrying data rather than displaying it, with no predefined elements, and facilitates data sharing and storage across various platforms. It consists of components like tags, elements, attributes, and a root element that organize data hierarchically, while also allowing for additional documentation. XML is distinct from HTML, which focuses on data presentation, as XML emphasizes data structure and flexibility in defining tags.
What is XML
•XMLstands for EXtensible Markup Language
•XML was designed to carry data, not to display data
• XML developed by the World Wide Web
Consortium (www.W3C.org)
•
• XML like HTML is a mark up language, but
unlike HTML it doesn’t have predefined
elements
3.
XML Versions
There aretwo current versions of XML:
v version XML 1.0 was initially defined in 1998
vversion XML 1.1 was initially published on 4th Feb 2004
Uses XML
ü WEBDEVELOPER
ü TRANSPORTING AND SHARING DATA
ü STORING DATA
ü DOCUMENTATION
ü ANDROID DEVELOPER
6.
XML Doc Advantages
qEasy data sharing, text documents are
readable between any device.
q Easy to learn.
q Extendable.
q Freedom to define tags.
q Easy searching.
q
7.
Disadvantages of XML
qTheredundancy may affect application
efficiency through higher storage,
transmission and processing costs.
8.
XML Document Components
Thevarious components of an XML document used
for representing data in a hierarchical order are:
q
Processing Instruction (PI)
q
Tags
q
Elements
q
Content
q
Attributes
q
Entities
q
Comments
9.
XML Document Components(Contd.)
<?xml version=“1.0” encoding=“UTF-8”?>
<STOREDATA>
<!--STOREDATA is the root element-->
<STORE STOREID=“S101”>
<PRODUCTNAME>Toys</PRODUCTNAME>
<QUANTITY>100</QUANTITY>
<DISPLAY>The price of this toy
is < 200 </DISPLAY>
</STORE>
</STOREDATA>
Processing Instruction (PI)
Provides information on how
the XML file should be
processed.
10.
XML Document ComponentsContd…
<?xml version=“1.0” encoding=“UTF-
8”?>
<STOREDATA>
<!--STOREDATA is the root element-->
<STORE STOREID=“S101”>
<PRODUCTNAME>Toys</PRODUCTNAME>
<QUANTITY>100</QUANTITY>
<DISPLAY>The price of this
toy is < 200 </DISPLAY>
</STORE>
</STOREDATA>
Root Element
Contains all other elements
in the document.
11.
XML Document ComponentsContd…
<?xml version=“1.0” encoding=“UTF-8”?
>
<STOREDATA>
<!--STOREDATA is the root element-->
<STORE STOREID=“S101”>
<PRODUCTNAME>Toys</PRODUCTNAME>
<QUANTITY>100</QUANTITY>
<DISPLAY>The price of this toy
is < 200 </DISPLAY>
</STORE>
</STOREDATA>
Tags
Is a means of identifying data.
Tags consist of start tag and
end tag.
12.
XML Document ComponentsContd…
<?xml version=“1.0” encoding=“UTF-8”?>
<STOREDATA>
<!--STOREDATA is the root element-->
<STORE STOREID=“S101”>
<PRODUCTNAME>Toys</PRODUCTNAME>
<QUANTITY>100</QUANTITY>
<DISPLAY>The price of this toy is <
200 </DISPLAY>
</STORE>
</STOREDATA>
Comments
Are statements used to
explain the XML code.
13.
XML Document ComponentsContd…
<?xml version=“1.0” encoding=“UTF-8”?>
<STOREDATA>
<!--STOREDATA is the root element-->
<STORE STOREID=“S101”>
<PRODUCTNAME>Toys</PRODUCTNAME>
<QUANTITY>100</QUANTITY>
<DISPLAY>The price of this toy is
< 200 </DISPLAY>
</STORE>
</STOREDATA>
Child Elements
Are the basic units
used to identify and
describe data in XML.
14.
XML Document ComponentsContd…
<?xml version=“1.0” encoding=“UTF-8”?>
<STOREDATA>
<!--STOREDATA is the root element-->
<STORE STOREID=“S101”>
<PRODUCTNAME>Toys</PRODUCTNAME>
<QUANTITY>100</QUANTITY>
<DISPLAY>The price of this toy is
< 200 </DISPLAY>
</STORE>
</STOREDATA>
subChild Elements
.
15.
XML Document ComponentsContd…
<?xml version=“1.0” encoding=“UTF-
8”?>
<STOREDATA>
<!--STOREDATA is the root element-->
<STORE STOREID=“S101”>
<PRODUCTNAME>Toys</PRODUCTNAME>
<QUANTITY>100</QUANTITY>
<DISPLAY>The price of this
toy is < 200 </DISPLAY>
</STORE>
</STOREDATA>
Attributes
Provide additional
information about the
elements for which
they are declared.
16.
XML Document ComponentsContd…
<?xml version=“1.0” encoding=“UTF-8”?>
<STOREDATA>
<!--STOREDATA is the root element-->
<STORE STOREID=“S101”>
<PRODUCTNAME>Toys</PRODUCTNAME>
<QUANTITY>100</QUANTITY>
<DISPLAY>The price of this toy is
< 200 </DISPLAY>
</STORE>
</STOREDATA>
Content (name of sub
children)
Refers to the information
represented by the elements
of an XML document. An
element can contain:
• Character or data content
• Element content
• Combination or mixed
content
XML vs. HTML
qXML is not a replacement for HTM
q XML was designed to carry data
q XML and HTML were designed with different goals
q XML was designed to describe data and to focus on
what data is
q html was designed to display data and to focus on
how data looks.
19.
q HTML isabout displaying information, while
XML is about
describing information
q Tags in html specific, but in xml can change to
any name
#10 Tell the students that the key words that they were told to note while discussing the definition of system forensics, will be elaborated as part of the system forensics process.
#11 Tell the students that the key words that they were told to note while discussing the definition of system forensics, will be elaborated as part of the system forensics process.
#12 Tell the students that the key words that they were told to note while discussing the definition of system forensics, will be elaborated as part of the system forensics process.
#13 Tell the students that the key words that they were told to note while discussing the definition of system forensics, will be elaborated as part of the system forensics process.
#14 Tell the students that the key words that they were told to note while discussing the definition of system forensics, will be elaborated as part of the system forensics process.
#15 Tell the students that the key words that they were told to note while discussing the definition of system forensics, will be elaborated as part of the system forensics process.
#16 Tell the students that the key words that they were told to note while discussing the definition of system forensics, will be elaborated as part of the system forensics process.
#17 Tell the students that the key words that they were told to note while discussing the definition of system forensics, will be elaborated as part of the system forensics process.