0% found this document useful (0 votes)
119 views3 pages

Web Designing 2 Unit 1 XML Notes

XML, or eXtensible Markup Language, is a markup language used for storing, structuring, and transporting data in a human-readable and machine-readable format. It is characterized by its extensibility, hierarchical structure, platform independence, and self-descriptive nature. Common uses of XML include data sharing across platforms, configuration files, and web services.

Uploaded by

imamoddin15
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
119 views3 pages

Web Designing 2 Unit 1 XML Notes

XML, or eXtensible Markup Language, is a markup language used for storing, structuring, and transporting data in a human-readable and machine-readable format. It is characterized by its extensibility, hierarchical structure, platform independence, and self-descriptive nature. Common uses of XML include data sharing across platforms, configuration files, and web services.

Uploaded by

imamoddin15
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Web Designing 2 - Unit 1: XML Full Notes

Unit 1: Introduction to XML

1. What is XML?

XML stands for eXtensible Markup Language. It is a markup language used to store, structure, and transport

data.

It is both human-readable and machine-readable, and allows users to define custom tags.

2. Characteristics of XML:

- Extensible: You can define your own tags.

- Structured: Stores data in hierarchical (tree) structure.

- Platform-Independent: Can be used across various platforms.

- Self-descriptive: Tags clearly describe the data.

- Unicode Supported: Supports multilingual data.

- Case-sensitive: <Name> and <name> are different.

3. XML Syntax Rules:

- Every tag must have a closing tag.

- Proper nesting of tags is mandatory.

- Only one root element per document.

- Tags and attributes are case-sensitive.

- Attribute values must be in quotes.

- Use entities for special characters.

Example:

<?xml version="1.0" encoding="UTF-8"?>

<student>

<name>Rahul</name>

<roll>101</roll>

<course>BSc CS</course>

</student>
Web Designing 2 - Unit 1: XML Full Notes

4. Structure of XML Document:

a) Prolog Section:

Contains XML declaration and comments.

Example:

<?xml version="1.0" encoding="UTF-8"?>

<!-- Student Data -->

b) Document Element Section:

Contains root and child elements.

Example:

<student>

<name>Priya</name>

<rollno>102</rollno>

</student>

5. XML Declaration:

It declares version and encoding of XML.

Syntax:

<?xml version="1.0" encoding="UTF-8"?>

6. Well-Formed XML Example:

<?xml version="1.0" encoding="UTF-8"?>

<university>

<student>

<name>Priya</name>

<rollno>202</rollno>

<course>MSc IT</course>

</student>

</university>

7. Common Mistakes in XML:

- Missing end tags


Web Designing 2 - Unit 1: XML Full Notes

- Improper nesting

- Not quoting attribute values

- Multiple root elements

- Using special characters (&, <) without encoding

8. Uses of XML:

- Data sharing across platforms and applications

- Configuration files in applications

- Web services (SOAP, RSS)

- Structured storage for web/mobile apps

Summary:

XML is a universal data format designed to store and share structured data in a readable and

platform-independent manner.

You might also like