Extensible Markup Language. A flexible way to create common information formats and share both the format and the data on the World Wide Web, intranets, and elsewhere. XML is a formal recommendation from the World Wide Web Consortium (W3C) similar to the language of today's Web pages, the Hypertext Markup Language (HTML).
XML Interviews are getting tough these days as the technology grows faster. To get through the XML interview one needs to update him/herself in a regular manner. Having said that, just before the interview, it is very important to have a quick glance of the reputed XML questions and answers to make yourself comfortable during the interview process. This is where DoAnswers.com helps you in renewing yourself on XML and various other technologies interview preparation.
1. What are the steps to transform XML into HTML using XSL?
An XSLT processor may output the result tree as a sequence of bytes.The xsl:output element allows stylesheet authors to specify how they wish the result tree to be output. If an XSLT processor outputs the result tree, it should do so as specified by the xsl:output element; however, it is not required to do so.The method attribute on xsl:output identifies the overall method that should be used for outputting the result tree.
2. What is the difference between SAX parser and DOM parser?
DOM parser - reads the whole XML document and returns a DOM tree representation of xml document. It provides a convenient way for reading, analyzing and manipulating XML files. It is not well suited for large xml files, as it always reads the whole file before processing.
SAX parser - works incrementally and generate events that are passed to the application. It does not generate data representation of xml content so some programming is required. However, it provides stream processing and partial processing which cannot be done alone by DOM parser.
3. What is the difference between Schema and DTD?
A DTD is:
The XML Document Type Declaration contains or points to markup declarations that provide a grammar for a class of documents. This grammar is known as a document type definition or DTD.
The DTD can point to an external subset containing markup declarations, or can contain the markup declarations directly in an internal subset, or can even do both.
A Schema is:
XML Schemas express shared vocabularies and allow machines to carry out rules made by people. They provide a means for defining the structure, content and semantics of XML documents.
In summary, schemas are a richer and more powerful of describing information than what is possible with DTDs.
4. What is XML Namespace?
Defining a namespace to avoid confusion involves using a prefix and adding an xmlns attribute to the tag to give the prefix a qualified name associated with the namespace. All child elements with the same prefix are associated with the namespace defined in the start tag of an element.
5. What is XML?
XML is the Extensible Markup Language. It improves the functionality of the Web by letting you identify your information in a more accurate, flexible, and adaptable way.
It is extensible because it is not a fixed format like HTML (which is a single, predefined markup language). Instead, XML is actually a metalanguage?a language for describing other languages?which lets you design your own markup languages for limitless different types of documents. XML can do this because it's written in SGML, the international standard metalanguage for text document markup (ISO 8879).
6. When constructing an XML DTD, how do you create an external entity reference in an attribute value?
Every interview session should have at least one trick question. Although possible when using SGML, XML DTDs don't support defining external entity references in attribute values. It's more important for the candidate to respond to this question in a logical way than than the candidate know the somewhat obscure answer.
7. Aren't XML, SGML, and HTML all the same thing?
Not quite; SGML is the mother tongue, and has been used for describing thousands of different document types in many fields of human activity, from transcriptions of ancient Irish manuscripts to the technical documentation for stealth bombers, and from patients' clinical records to musical notation. SGML is very large and complex, however, and probably overkill for most common applications. XML is an abbreviated version of SGML, to make it easier for you to define your own document types, and to make it easier for programmers to write programs to handle them. It omits all the options, and most of the more complex and less-used parts of SGML in return for the benefits of being easier to write applications for, easier to understand, and more suited to delivery and interoperability over the Web. But it is still SGML, and XML files may still be processed in the same way as any other SGML file (see the question on XML software). HTML is just one of the SGML or XML applications, the one most frequently used in the Web.
8. But I really, really want plain XML. No compression, no binary data, no nothing. Just plain XML. Can I have that, please?
For purposes of import and export, we provide UNO-based services that allow you to import or export XML data through the SAX interface. A documentation of this technique is available here. Also, it is planned to allow plain XML files (without packages) to be read and written. However, this is not implemented yet.
9. Can I do mathematics using XML?
Yes, if the document type you use provides for math. The mathematics-using community is developing software, and there is a MathML Recommendation at the W3C, which is a native XML application. It would also be possible to make XML fragments from other DTDs, such as the long-expired HTML3, the near-obsolete HTML Pro, or ISO 12083 Math, or OpenMath, or one of your own making. Browsers which display some math embedded in SGML already exist (eg DynaText, Panorama, Multidoc Pro).
10. Can I write an XML translation from or into ...?
You are absolutely welcome to write transformation from our XML-based file format into and from anything you see fit.