Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the advantages of creating web pages with XML instead of HTML?

Tags:

html

xml

xhtml

From time to time, I see web pages whose content is solely written in XML (not HTML or XHTML). These pages usually have some style sheets (either XSLT or CSS) attached to them which makes them look like any other ordinary web page.

My question is, what are the advantages of such an approach (if any), and why would anyone choose to work this way?

EDIT: If this is a good thing, why is it not widespread?

EDIT 2: Thanks everyone for the great responses. They really enlightened me. I also found this question whose content is also related.

like image 928
Venemo Avatar asked Sep 11 '10 14:09

Venemo


People also ask

Is XML more powerful than HTML?

As you can see, they are two very different languages used for different purposes. While HTML is a basic language that is easy to learn, XML is much more flexible and powerful.

What is XML how it is different from HTML?

HTML and XML are related to each other, where HTML displays data and describes the structure of a webpage, whereas XML stores and transfers data. HTML is a simple predefined language, while XML is a standard language that defines other languages.

What is the difference between HTML and XML What are the pros cons?

KEY DIFFERENCE XML is abbreviation for extensible Markup Language whereas HTML stands for Hypertext Markup Language. XML mainly focuses on transfer of data while HTML is focused on presentation of the data. XML is content driven whereas HTML is format driven. XML is Case sensitive while HTML is Case insensitive.


1 Answers

It's easier to generate it programmatically and reuse it for other purposes than displaying as webpage.


Update:

EDIT: If this is a good thing, why is it not widespread?

Not everyone needs to generate it programmatically or reuse it for other purposes than displaying as webpage. It's then easier to use plain HTML.

like image 161
BalusC Avatar answered Sep 22 '22 17:09

BalusC