Home / Interview / XML :: General Questions

Interview :: XML


What is XML?

XML stands for eXtensible Markup Language. It is a simple and flexible markup language. It is known as universal language for data on the web because XML documents can be created and used in any language. It is universal standard for information interchange.

XML technology facilitates you to create your own markup language.

2) How XML is different from HTML?

HTML stands for Hyper Text Markup Language while XML stands for eXtensible Markup Language. The key differences between HTML and XML are given below:

1)HTML is used to display data and focuses on how data looks.XML is a software and hardware independent tool used to transport and store data. It focuses on what data is.
2)HTML is a markup language itself.XML provides a framework to define markup languages.
3)HTML is not case sensitive.XML is case sensitive.
4)HTML is a presentation language.XML is neither a presentation language nor a programming language.
3) What is the meaning of version in XML?

Version is a tag used to show which version of XML is used.

4) What are the benefits of XML?

These are the main benefits of using XML.

Simplicity: Very easy to read and understand the information coded in XML.

Openness: It is a W3C standard, endorsed by software industry market leaders.

Extensibility: It is extensible because it has no fixed set of tags. You can define them as you need.

Self-descriptive: XML documents do not need special schema set-up like traditional databases to store data. XML documents can be stored without such definitions, because they contain metadata in the form of tags and attributes.

Scalable: XML is not in binary format so you can create and edit files with anything and it is also easy to debug.

Fast access: XML documents are arranged in hierarchical form so it is comparatively faster.

5) What is XML DOM?

DOM stands for Document Object Model which is used to describe the logical structure of XML document. It is a hierarchical model that provides a way to access and manipulate an XML document.

DOM methods and objects can be used with any languages like C#, VB, JavaScript and VB Script.

6) What is SAX in XML?

SAX stands for Simple API for XML. It is a sequential access parser. It is a simple API for XML which provides a mechanism for reading data from an XML document. It is an alternative of DOM. DOM operates on the documents as whole, SAX parsers operate on each piece of the XML document sequentially.

SAX has no formal specification like DOM and consumes less memory. But it can be used to read the XML document only not write.

7) What is XSNL?

XSNL is an XML search neutral language. This language acts between the meta search interface and targeted system.

8) What is a well formed XML document?

A syntactically correct document is called well formed XML document. A well formed XML document must follow the XML?s basic rules of syntax:

  • It must have a closing tag.
  • The closing tag must exactly match the open tag: XML is case sensitive.
  • All elements should be included within a single root tag.
  • Child elements must be closed within parent tag.
9) What is a valid XML document?

A structurally correct element is called a valid XML document. It should follow some predefined rules of a specific type of document. These rules determine the type of data that each part of the document can contain. These rules can be written by the author of an XML document or someone other.

Note: A valid XML document may be well-formed but a well-formed XML document may not be valid.

10) What is DTD?

DTD stands for Document Type Definition. It defines a leading building block of an XML document. It defines:

  • Names of elements
  • How and where they can be used
  • Element attributes
  • Proper nesting