| Format | Strength |
|---|---|
| JSON | Compact, native in browsers, great for REST APIs |
| HTML | Fixed vocabulary for web pages; error-tolerant parsing |
| XML | Schemas, mixed content, namespaces, mature enterprise tooling |
Many systems use JSON for APIs and XML for documents/feeds/legacy.
Going deeper
In production XML work, XML vs JSON and HTML matters when documents, stylesheets, or apps must stay maintainable across teams and releases—not only in isolated demos.
Common pitfalls
Watch for copy-paste configs, skipping validation or tests, and mixing concerns (structure vs presentation vs behavior) in one layer.
Practice
- Apply one technique from this lesson in the playground.
- Write one interview-style sentence explaining when you would use xml vs json and html on a real project.
Interview prep
- When choose XML over JSON?
Schema-heavy contracts, legacy enterprise APIs, document markup (SVG), or tooling that expects XML.