Explain the difference between XML and HTML.
  • XML describes data while HTML describes how the data should be displayed. Therefore, HTML is about displaying information while XML is about describing information.
  • XML supports user-defined tags while HTML provides pre-defined tags.
  • XML is a case-sensitive language while HTML language is not case-sensitive.
  • In XML, all tags must be closed; while in HTML, it is not necessary to close each tag.

What is XML DOM?
The DOM stands for Document Object Model, which describes the logical formation of documents and provides the way to access and manipulate a document. It supplies an Application Programming Interface (API) to XML documents. It is built around the object-oriented design; therefore, it is known as DOM. The DOM model considers an XML document as a composition of objects and every object consists of properties and behaviors that can be manipulated by the DOM methods. The DOM allows creating and building XML documents, navigating the structure of documents, and managing the elements and their data. You can use the DOM methods and objects with any language, such as C#, VB, JavaScript, and VBScript.

Which namespaces in .NET are used for XML?
The System.xml.dll is the real physical file, which contains the XML implementation. Some of the other namespaces that allow .NET to use XML are as follows:
  • System.Xml
  • System.Xml.Schema
  • System.Xml.XPath
  • System.Xml.Xsl

Explain different types of XML Application Programming Interface (API).
The following are two main types of XML parsers:
  • Tree-based API - Compiles an XML document into a tree structure and loads it into memory. You can traverse and change the tree structure. The DOM is an example of a tree-based API.
  • Event-based API - Provides the report to an application about the parsing events by a set of built-in callback functions. An example of the event-based API is SAX.