XML Overview: by Higgins Hartson Doviko & Mtoyoyo Isaac Monawe
XML Overview: by Higgins Hartson Doviko & Mtoyoyo Isaac Monawe
• Extensible Markup Language (XML) is a markup language used for data exchange
between applications and systems.
• Unlike HTML, which defines how data is displayed, XML focuses on structuring data
in a way that is both human-readable and machine-readable.
• Think of it as a flexible container that can hold any type of information.
STRUCTURE/SYNTAX
• Element – XML has elements which has opening, content and closing tag, example
<title> Monawe </title>.
• Attributes – XML elements has attributes for additional details for content, example
<book title=“Famous Nkhaniyawo” author=“H.H.D Ntchafuzinkomola”/>
• Hierarchy – XML elements can be nested within each other creating hierarchical
structure.
STRUCTURE/SYNTAX CONTI..
Example
<order>
<customer_id>123</customer_id>
<items>
<item>
<product_name>Book</product_name>
</item>
</items>
<total_amount>20.00</total_amount>
</order>
ADVANTAGES
• Less reliable than other text-data-transmissions like JSON and YAML (which are more
faster).
• Does not support array.
• High storage and transportation cost when data volume is large.
XML APPLICATION IN WEB TECH
• Data Exchange: Web services often use XML to exchange data between applications
(e.g., product catalogs, financial transactions).
• Configuration Files: Many web applications use XML files to store configuration
settings.
CONCLUSION
• XML is a powerful tool for structuring and sharing data in web technologies.
• Its flexibility, platform independence, and ease of use make it a popular choice for data
exchange across diverse systems.