Home / Interview / XML :: General Questions

Interview :: XML

21) What is XML data binding? Why is it used?

XML data binding is the process of representing the information in an XML document as an object in computer memory.

XML data binding is used to short your development effort, simplify maintenance, increase reliability. It saves your development time and money. It makes working with XML data very intuitive.

22) What is XML encoding error?

There are two types of XML encoding errors:

  1. An invalid character was found in text content.
  2. Switching from current encoding to specified encoding not supported.

These errors occur because XML document can contain non ASCII characters like Norwegian and French. These errors can be avoided by specifying the XML encoding Unicode.

23) What are the different XML API's?

Tree-based API: It compiles an XML document in a tree like structure and loads it into the memory. You can traverse and change the tree structure. Tree based API's are useful for a wide range of applications. Example of tree-based API is DOM parser.

Event-based API: An event based API provides the reports to an application about the parsing event. It uses a set of built-in call back functions. Example of event-based API is SAX parser.

24) What is XmlReader class? Explain.

The XmlrReader class represents a reader that provides fast, noncached, forward-only access to XML data. You need to import the following namespaces to work with XmlReader class in .NET.

In VB:

Imports System.Xml

In C#:

using System.Xml;

25)

What is the difference between CDATA and PCDATA?

CDATA means unparsed character data whereas PCDATA means parsed character data.

26) What is XQuery?

XQuery is a query language that is used to retrieve data from XML document.

27) What is XML Namespace?

A namespace is a qualified name that is associated with the DTD/Schema location .

A document may have duplicate elements and attributes. So, the namespace defines a way to compare duplicate elements and attribute names.

28) What is SGML?

SGML is a vast and powerful generalized markup language that is used to define descriptions for the structure of several electronic documents.

29) Can we use graphics in XML?

Yes, graphics can be stored in XML file by using XLink and XPointer. It supports graphics like GIF, JPG, TIFF, PNG, CGM, EPS, SVG.

30) Is XML case sensitive?

Yes, XML is a case sensitive language.