Home
XML
Interview FAQs

FAQs of level

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.

Even if candidates have never participated in a project involving this type of architecture, they should recognize it as one of the common uses of XML. Querying a database and then formatting the result set so that it can be validated as an XML document allows developers to translate the data into an HTML table using XSLT rules. Consequently, the format of the resulting HTML table can be modified without changing the database query or application code since the document rendering logic is isolated to the XSLT rules.

Following are the naming conventions that need to be followed for XML elements tags:

  • Element names should contain only characters, numbers, hyphens, and periods.
  • Element names cannot not begin with a number or punctuation character.
  • Element names must not start with the word xml (or XML, or Xml).
  • Element names cannot consist spaces.
  • Element names can be used any words except xml, XML, or Xml because no words are reserved in XML.

It removes two constraints which were holding back Web developments: dependence on a single, inflexible document type (HTML) which was being much abused for tasks it was never designed for; the complexity of full SGML, whose syntax allows many powerful but hard-to-program options. 

The following are the rules and regulations that are necessary to follow while creating a well-formed XML document:

  • Every start tag must end with an end tag.
  • A root element should be included for enclosing other child elements.
  • XML tags are case-sensitive; therefore, start and end tags must be of same spelling and the casing should also be the same.
  • XML empty tags are necessary to close with a forward slash (/).
  • XML attributes values are necessary to enclose within double quotation marks.
  • XML tags must be properly nested. It means starting tags should be closed in the reverse order in which they present.

For Internet Explorer, an ActiveXObject is used for declaring an XmlHttpRequest object in Javascript. 

//Code as below for IE: 
xmlHttpObject = new ActiveXObject("Msxml2.XMLHTTP"); 
//For Other browsers, code as below: 
xmlHttpObject = new XMLHttpRequest(); 
Note that XmlHttpObject used above is simply a variable for the respective browsers.

.config files in .NET are supported through the API to allow storing and retrieving information. They are nothing more than simple XML files, sort of like what .ini files were before for Win32 apps.

A language specially designed for processing, defining and presenting text/data is called a Markup Language.

Every interview session should have at least one trick question. Although possible when using SGML, XML DTDs do not support defining external entity references in attribute values. It is more important for the candidate to respond to this question in a logical way than than the candidate know the somewhat obscure answer.

No, although it is useful because a lot of XML terminology and practice derives from two decades experience of SGML.
Be aware that ?knowing HTML? is not the same as ?understanding SGML?. Although HTML was written as an SGML application, browsers ignore most of it (which is why so many useful things do not work), so just because something is done a certain way in HTML browsers does not mean it is correct, least of all in XML.

PreviousDisplaying 5 of 7Next
1 2 3 4 5 6 7
Need Help? Contact Us.

Log in

*
*

Forgot password?

*

New User

*
*
*
*