Pec-Cs801d
Pec-Cs801d
2
(XML)
Date : 08/03/2025
3
Introduction
History of XML
XML declaration
Attributes
Version
Used version XML in this document.
Encoding
Used encoding in this document.
Example
<?xml version="1.0" encoding="UTF-8"?>
<message>
<warning>
Hello World
<!--missing </warning> -->
</message>
Character references
Like HTML, XML offers character references for referring to
some special reserved characters (such as a greater than sign
which is used for tags). There are five of these characters :
7
Displaying XML
XML is usually used for descriptive purposes, but there are ways
to display XML data. If you don't define a specific way for the
XML to be rendered, the raw XML is displayed in the browser.
One way to style XML output is to specify CSS to apply to the
document using the xml-stylesheet processing instruction.
<?xml-stylesheet type="text/css" href="stylesheet.css"?>
Applications of XML
When displaying data in HTML, you should not have to edit the
HTML file when the data changes.
With XML, the data can be stored in separate XML files.
With a few lines of JavaScript code, you can read an XML file and
update the data content of any HTML page.
Transaction Data
XML HttpRequest
XML Parser
Advantages of XML
Future of XML
Despite the rise of JSON and other modern data formats, XML
continues to be relevant in various domains, especially where
data integrity, standardization, and document handling are
crucial. The integration of XML with AI-driven data processing
and cloud computing is expected to keep it in use for years to
come.
Conclusion