Back to Guide
.xml
Extensible Markup Language
Extensible Markup Language (XML) is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable.
Advertisement
History & Origin
Developed by the W3C in 1996, XML was designed to be a more flexible and strict successor to SGML. It became the backbone of the semantic web and enterprise data interchange in the late 90s and 2000s.
Internal Structure
XML documents form a tree structure. They start with a root element and contain nested child elements. Tags are user-defined (unlike HTML). It supports attributes, namespaces, and strict validation via DTD or XSD schemas.
Advantages
- Self-descriptive: Tags describe the data.
- Extensible: You can define your own tags.
- Standardized: Strong support for schemas and validation.
- Platform independent.
Disadvantages
- Verbose: Tags occupy a lot of space, making files larger than JSON.
- Complex parsing: Parsing XML requires more processing power than JSON.
- Redundant: Closing tags repeat information.
Common Use Cases
RSS feeds
Sitemaps
SOAP web services
Office document formats (like .docx and .xlsx are just zipped XMLs)
Configuration files
Advertisement
