XML Interview Questions
1. what is XML?
XML stands for Extensible Markup Language
It is a meta-markup language (you make up your own tags)
XML is not a programming language, it is a data format
XML documents can be parsed.
2. What is the difference between XML & HTML?
XML describes data, HTML displays data.
HTML has predefined tags, in XML we define tags
HTML can be displayed on its own, XML cannot.
The combination of XML and HTML is XHTML.
3. What is a "well-formed" document?
The well formed document must obey the basic XML constraints like :
All Documents must have a prolog.
Document must have a root tag.
All begin-tags must have end-tags. (case sensitive)
All attribute values must be quoted.
Elements must be properly nested.
All entities must be declared.
If a document is not a well-formed document it is not a XML document.
4. What is DTD?
Document Type Definition defines the structure of an XML document. A
DTD can be declared inline in your XML document, or as an external
reference.
DTD defines :
What element (tag) names are allowed
What attributes are used with each element
Which child elements belong to which parent elements
What order child elements can appear in
Also declares entities and notations
5. What are the building blocks of XML?
Elements
Attributes
Entities
Notations
6. What is a valid document
If a document's structure and tag names match the information model,
it is `valid'. Validation is optional. A valid document is always
well-formed.
7. What is XSLT?
XSLT is a language for transforming the structure of XML documents.
The XSL Transformations (XSLT) vocabulary provides a rule-based
framework for selecting and processing document content, and
transforming it into new documents
8. What is XML Parser?
A set of software components designed for reading, processing and
creating XML documents.
Parsers expose the structures and tags within a XML document thus
making it easy to process XML documents.
9. What are the types of Parsers
DOM Vs SAX
SAX is event-based and DOM is object-based
SAX is developed by XML-Dev mailing list and DOM is a W3C
recommendation
DOM constructs a tree in memory and SAX does not
SAX is read-only and DOM is read-write.
SAX uses less memory and is fast & efficient
We also have Validating and non-validating parsers.
10. What is XML family ?
Display : XHTML, XSLT, XSL
Modeling : DTD, XML Schema
Manipulating : DOM, SAX
Querying : Xlink, XQL, Xpath
0 comments:
Post a Comment