UNIT 4 Introduction To XML
UNIT 4 Introduction To XML
XML Documents
WHAT IS XML ?
XML is abbreviated as eXtensible Markup Language. XML is used as
the markup language,it is differed by other markup language by its
properties of designing and describing the data.
The origin of XML language is generated using Standard Generalized
Markup Language (SGML).
XML consist of its unique characteristics like tag specification which
gives more advantage to XML
XML was designed to store and transport data
WHAT IS XML ?
• The XML above is quite self-descriptive:
• It has sender information
• It has receiver information
• It has a heading
• It has a message body
• But still, the XML above does not DO anything. XML is just information wrapped in tags.
Difference Between XML and HTML
XML and HTML were designed with different goals:
• XML was designed to carry data - with focus on what data is.
• HTML was designed to display data - with focus on how data looks.
• XML tags are not predefined like HTML tags.
• The tags in the example above (like <to> and <from>) are not
defined in any XML standard. These tags are "invented" by the
author of the XML document.
• HTML works with predefined tags like <p>, <h1>, <table>, etc.
• With XML, the author must define both the tags and the document
structure.
USAGE OF XML
(1) XML is used to improve the production of HTML records for enormous
sites.
(2) XML is utilized for exchange the information between organizations
and systems.
(3) XML is used to offloading and reloading data sets.
(4) XML is used to store and arrange the data, which can customize your
data handling needs.
(5) XML can easily be merged with style sheets to create almost any
desired output.
6) Virtually, any type of data can be expressed as an XML document.
XML SYNTAX
Creating the XML code is very easy and it is strict. It is easy to
understand and easy way to use. So, the software-based
application can easily support the XML.
XML DECLARATION : XML document is starting with XML
declaration.
SYNTAX RULE FOR DECLARATION
XML document is the case sensitive it is start by specifying
“xml”
XML document must start first with XML declaration
statement
An HTTP protocol can override the value of encoding that
you put in the XML declaration
XML
XML DECLARATION -UTF-8 is also the default encoding for HTML5, CSS, JavaScript, PHP, and
SQL.
XML TEXT
Difference between Element and
attribute