Skip to content
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
🔒 Locked · start free trial →

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:

PointHTMLXML
Purposedisplays data in a browserstores/transports data
Tagspredefined and fixed (<p>, <h1>)user-defined (extensible)
Describesappearance/structure of a pagemeaning of the data
Rulesfairly lenientstrict — every tag closed, properly nested
Casenot case-sensitivecase-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.