XML Interview questions And Answers for freshers as well 1 to 3 year experienced on advance and basic XML with examples that cover the essentials of XML means all type of XML questions covered under this page and also a form is given at the end of this page for those user who want more Interview questions and answer on XML just need to fill the form and send us we will send all the answers to them and it for both freshers and experienced condidate and also chat option is given in right hand side for directly chat with for answers
|Questions : 1||What is XML?|
|Answers : 1||
XML (Extensible markup language) is all about describing data. Below is a XML which
describes book store.
|Questions : 2||What is the version information in XML?|
|Answers : 2||
"version" tag shows which version of XML is used.
|Questions : 3||What is ROOT element in XML ?|
|Answers : 3||
In our XML sample given previously < book> book> tag is the root element. Root element is the top most elements for a XML. and it's must be unique
|Questions : 4||If XML does not have closing tag will it work ?
|Answers : 4||
No, every tag in XML which is opened should have a closing tag. For instance in the top if we remove php> tag that XML will not be understood by lot of application.
|Questions : 5||Is XML case sensitive ?|
|Answers : 5||
Yes, they are case sensitive. .
|Questions : 6||What is the difference between XML and HTML?|
|Answers : 6||
XML describes data while HTML describes how the data should be displayed. So HTML is about displaying information while XML is about describing and storing the information.
|Questions : 7||Is XML meant to replace HTML?|
|Answers : 7||
No, they both go together one is for describing data while other is for displaying data.
|Questions : 8||Can you explain why your project needed XML ? or why you have chosen XML.|
|Answers : 8||
Remember XML was meant to exchange data between two entities as we can define our user friendly tags with ease. In real world scenarios XML is meant to exchange data. For instance we have two applications who want to exchange information. But because they work in two complete opposite technologies itís difficult to do it technically. For instance one application is made in JAVA and the other in .NET. But both languages understand XML so one of the applications will spit XML file which will be consumed and parsed by other applications
we can give a scenario of two applications which are working separately and how you chose XML as the data transport medium.
|Questions : 9||What is DTD ( Document Type definition )?|
|Answers : 9||
It defines how our XML should structure.means type of element like integer or value char etc
|Questions : 10||What is well formed XML?|
|Answers : 10||
If a XML document is confirming to XML rules (all tags started are closed, there is a root element , all valid char have used etc) then itís a well formed XML.
|Questions : 11||What is a valid XML?|
|Answers : 11||
If XML is confirming to DTD rules then itís a valid XML.
|Questions : 12||What is CDATA section in XML?|
|Answers : 12||
All data is normally parsed in XML but if you want to exclude some elements you will need to put those elements in CDATA.
|Questions : 13||What is element and attributes in XML?|
|Answers : 13||
In the below example book is the element and the price the attribute < book price=1002>< /book>
|Questions : 14||What is XSL?|
|Answers : 14||
XSL (the eXtensible Stylesheet Language) is used to transform XML document to some other document. So its transformation document which can convert XML to some other document. For instance you can apply XSL to XML and convert it to HTML document or probably CSV files.
|Questions : 15||What are the standard ways of parsing XML document? or What is a XML parser?|
|Answers : 15||
XML parser sits in between the XML document and the application who want to use the
XML document. Parser exposes set of well defined interfaces which can be used by the
application for adding, modifying and deleting the XML document contents. Now whatever
interfaces XML parser exposes should be standard or else that would lead to different
vendors preparing there own custom way of interacting with XML document.
DOM: - Document Object Model.
SAX: - Simple API for XML.
|Questions : 16||In What scenarios will you use a DOM parser and SAX parser ?|
|Answers : 16||
=> If we do not need all the data from the XML file then SAX approach is much
preferred than DOM as DOM can quiet memory intensive. In short if you need
large portion of the XML document its better to have DOM.
|Questions : 17||Define XPATH? and What is XSLT?|
|Answers : 17||
XPATH is an XML query language to select specific parts of an XML document. Using XPATH we can address or filter elements and text in a XML document. For instance a simple XPATH expression like "book/price" states find "price" node which are children of ďInvoiceĒ node.
XSLT is a rule based language used to transform XML documents in to other file formats. XSLT are nothing but generic transformation rules which can be applied to transform XML document to HTML, CS, Rich text etc.
|Questions : 18||What is the concept of XPOINTER?|
|Answers : 18||
XPOINTER is used to locate data within XML document. XPOINTER can point to a
particular portion of a XML document, for instance