LambdaLabTM
Computer Networks · Class 12 · Web Services · HTML and XML
networksweb services⏱️ 7 min read

XML

🎬 This chapter has a 12:38 video: Web Services →

Every March, thousands of schools send their students’ marks to the board. The board’s computer does not want a nice-looking page; it wants to know which number is a roll number and which is the marks. XML is one way to label data so that another computer can tell.

1What XML is

XML
XML stands for Extensible Markup Language. It is a markup language used to store and transport data. Its tags are not predefined: you create your own tags to describe your data.

Extensible means it can be extended — you can add any tags you need. Here is one student’s result in XML. Nobody defined <marks> in advance; the school chose it, and the tag says exactly what 91 is.

result.xml
<?xml version="1.0"?>
<result>
  <student>
    <name>Aman</name>
    <class>12</class>
    <marks>91</marks>
  </student>
</result>
Carrying data in your own tags

Send the correct document, then try each mistake. Drag sideways to turn.

Press ▶ Play to send a student's result as XML.
The XML document
<?xml version="1.0"?>
<result>
  <student>
    <name>Aman</name>
    <class>12</class>
    <marks>91</marks>
  </student>
</result>

✓ Well-formed: every tag is closed, in order, inside one root element.

2XML’s rules are strict

Because a computer has to read XML without guessing, every XML document must follow these rules. The lab’s mistakes break one each.

  1. Every opening tag has a closing tag: <marks>91</marks>.
  2. XML is case-sensitive: <Name> and <name> are different tags, so one cannot close the other.
  3. Tags close in the reverse order they opened: the one opened last closes first.
  4. There is exactly one root element that holds everything else (here, <result>).

A document that follows the rules is called well-formed. If it breaks even one, a program reading it stops and rejects the whole document. (Every verdict in the lab was checked against Python’s own XML reader.)

XML is text, so anyone can read it
An XML file is plain text. A person can open it and understand it, and so can a program on any kind of computer. That is why it is used to transport data between different systems and to store settings and records.

3From the board papers

1
Expand the term XML.CBSE board exam 2026 · also with URL (compartment 2024), PPP (board 2024) and HTTPS (compartment 2023)
1 mark
▶Show the answer

Extensible Markup Language.

2
Which of the following options is true about XML? (A) It stands for Expert Manipulating Language. (B) It is a programming language. (C) It is a dynamic language used to store and transport data through web pages. (D) It is same as HTML.CBSE compartment exam 2026
1 mark
▶Show the answer

(C). XML stores and transports data. It is a markup language, not a programming language — it cannot calculate or make decisions — and it is not the same as HTML.

4Check yourself

Quick Check

Why is this XML rejected? <Marks>91</marks>

Quick Check

What does the X in XML — Extensible — mean?