Exercises · Q14
Q.What is XML, and how does it differ from HTML? Give a small XML example that stores one student's roll, name and marks.
ChseodishaTextbookSubjectiveImportance★★★★★est
100% · 14/14 Questions
You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.
Start your 14-day free trial to unlock the full solution →What XML is. XML — eXtensible Markup Language — is a markup language whose job is to store and carry data between programs, not to display it. Its power is that you can invent your own tags to label the data meaningfully (hence 'extensible').
Example — one student's data:
<student>
<roll>21</roll>
<name>Amit</name>
<marks>88</marks>
</student>
Here <roll>, <name> and <marks> are tags created by the author to describe the data — there is no such thing as a <roll> tag in HTML.
How XML differs from HTML:
| Point | HTML | XML |
|---|---|---|
| Purpose | displays data in a browser | stores/transports data |
| Tags | predefined and fixed (<p>, <h1>) | user-defined (extensible) |
| Describes | appearance/structure of a page | meaning of the data |
| Rules | fairly lenient | strict — every tag closed, properly nested |
| Case | not case-sensitive | case-sensitive (<Name> ≠ <name>) |
Unlock everything free for 14 days
- Full step-by-step solutions
- Concept-first explanations
- Methods, shortcuts & mistakes
- PYQ mapping + timed mock tests
Full access for 14 days. No credit card required.