XML (eXtensible Markup Language) is used to store and transport data. It is both human-readable and machine-readable. XML is commonly used in Android layouts, web services, configuration files, and data exchange.
- Self-descriptive tags
- Platform and language independent
- Hierarchical (tree-based) structure
- Supports Unicode
- Custom user-defined tags
- Used widely for configuration and data transfer
<?xml version="1.0" encoding="UTF-8"?>
<note>
<to>John</to>
<from>Alice</from>
<heading>Reminder</heading>
<message>Don't forget our meeting tomorrow!</message>
</note>
XML vs HTML Feature XML HTML Purpose Data storage/transport Display content Tags User-defined Predefined Case-sensitive Yes No Error handling Strict Lenient Structure Hierarchical Document-based