What is XML
• XML stands 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
XML Versions
version XML 1.0 was initially defined in 1998
version XML 1.1 was initially published on 4th Feb 2004
Example language of xml structure
XHTML
WML AND WAP
SVG
Uses XML
WEB DEVELOPER
TRANSPORTING AND SHARING DATA
STORING DATA
DOCUMENTATION
ANDROID DEVELOPER
XML Doc Advantages
Easy data sharing, text documents are readable between any device.
Easy to learn.
Extendable.
Freedom to define tags.
Easy searching.
Disadvantages of XML
The redundancy may affect application efficiency through higher storage, transmission and processing costs.
XML Document Components
The various components of an XML document used for representing data in a hierarchical order are:
Processing Instruction (PI)
Tags
Elements
Content
Attributes
Entities
Comments
2. What is XML
•XML stands 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 are two 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
5. Uses XML
ü WEB DEVELOPER
ü TRANSPORTING AND SHARING DATA
ü STORING DATA
ü DOCUMENTATION
ü ANDROID DEVELOPER
6. XML Doc Advantages
q Easy 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
qThe redundancy may affect application
efficiency through higher storage,
transmission and processing costs.
8. XML Document Components
The various 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 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>
Root Element
Contains all other elements
in the document.
11. 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>
Tags
Is a means of identifying data.
Tags consist of start tag and
end tag.
12. 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>
Comments
Are statements used to
explain the XML code.
13. 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>
Child Elements
Are the basic units
used to identify and
describe data in XML.
14. 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>
subChild Elements
.
15. 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>
Attributes
Provide additional
information about the
elements for which
they are declared.
16. 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>
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
18. XML vs. HTML
q XML 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 is about displaying information, while
XML is about
describing information
q Tags in html specific, but in xml can change to
any name
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.
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.
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.
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.
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.
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.
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.
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.