HomePage     |    Contact Us    |   Contribute     |  Forums     |  Blog

 

 

XML Interview Questions

XML

1.     What is XML?

XML stands for Extensible markup language. This is a very good way to represent data in a structured format. Users define all the tags in XML.

2.     What is W3C?

World Wide Web Consortium, which defines all the standards for XML and HTML.

3.       Which is the best API to parse a huge XML document, to get parts of data from the XML document?

There is no single answer to this question. It depends. SAX would be better alternative, if the requirement were to "look-into" a huge XML document for some chunk of data. DOM load/unload of huge XML documents needs lot of memory and other resources, whereas SAX parses the XML character-by-character, and hence is well suited in this case. There are cases where we may go with a custom built parser and not SAX or DOM to improve performance.

4.     What are the core protocols behind XML Web services?

XML (for message format), HTTP and others (for transport), WSDL (Web Service Definition Language, to describe the Web services and define the contract), and UDDI (Universal Description, Discovery and Integration, to dynamically discover and invoke Web services)

5.     Describe the role that XSL can play when dynamically generating HTML pages from a relational database.

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.

6.     What is SOAP and how does it relate to XML?

The Simple Object Access Protocol (SOAP) uses XML to define a protocol for the exchange of information in distributed computing environments. SOAP consists of three components: an envelope, a set of encoding rules, and a convention for representing remote procedure calls. Unless experience with SOAP is a direct requirement for the open position, knowing the specifics of the protocol, or how it can be used in conjunction with HTTP, is not as important as identifying it as a natural application of XML.

7.     Can you walk us through the steps necessary to parse XML documents?

Superficially, this is a fairly basic question. However, the point is not to determine whether candidates understand the concept of a parser but rather have them walk through the process of parsing XML documents step-by-step. Determining whether a non-validating or validating parser is needed, choosing the appropriate parser, and handling errors are all important aspects to this process that should be included in the candidate's response.

8.     How would you build a search engine for large volumes of XML data?

The way candidates answer this question may provide insight into their view of XML data. For those who view XML primarily as a way to denote structure for text files, a common answer is to build a full-text search and handle the data similarly to the way Internet portals handle HTML pages. Others consider XML as a standard way of transferring structured data between disparate systems. These candidates often describe some scheme of importing XML into a relational or object database and relying on the database's engine for searching. Lastly, candidates that have worked with vendors specializing in this area often say that the best way the handle this situation is to use a third party software package optimized for XML data.