MENU
Question -

Write two points of differences between XML and HTML. What is meant by a well-formed XML document (write two points)? Write the code to create an XML document with following data:



Answer -

The differences between XML and HTML are as follows:

HTML has predefined tags while XML has user-defined tags.
HTML document can be viewed directly by the Web browser while XML document cannot be viewed directly and need some proper stylesheet files.
A well-formed document means to follow several generic rules, such as follows:

XML document must contain atleast one element.
All tags must have the opening and closing tags as these XML tags are case sensitive.
The XML code is
Singapore
200000
8
Aeroplane
Shimla
10000
4
Bus

Comment(S)

Show all Coment

Leave a Comment

Free - Previous Years Question Papers
Any questions? Ask us!
×