TOP XML Interview Questions and Answers

Read Latest XML Interview Questions and Answers for Freshers, 2+ Years Experienced Q and A with Explanation PDF.

What is an XML Schema?

An XML schema gives the definition of an XML document, and it has following:

• Elements and attributes

• Elements that are child elements

• Order of child elements

• Data types of elements and attributes

Why XSLT is important for XML?

XSLT is abbreviated as eXtensible Sytlesheet Language Transformation which is used to transform an XML document to HTML before it is displayed to the browser.

What are the types of XML Parsers?

There are two types of parsers – Non-Validating and Validating Parsers. Name itself implies Non-Validating will not validate the XML and Validating parser will validate the XML with DTD.

What is XPath?

XPath is used to find information in an XML document and contains standard functions. XPath is the major element in XSLT, and it is w3c recommendation.

What is well formed XML document?

A well-formed XML document must follow the following rules  –

• Every start tag should end with an end tag

• XML tags are case sensitive

• Empty tags are necessary to close with a forward slash

• All tags should be properly nested

What are nested elements in XML?

If one or more elements are nested inside the root element is called nested element. Nesting can be easy to understand and also keeps order in an XML document.

Whether root element is required for XML? If so, how many root elements are required?

Yes, root element is required, and it can have only one root element in each XML.

What is an attribute?

An attribute provides more or additional information about an element than otherwise.

Example –

<Person name=”Peter”>

Attribute name can be given to an element person.

Why XML has been used for development?

XML is used for development for following reasons:

• Used for Database driven websites

• Used to store data for e-commerce websites

• Used to transport and store data on internet

• XML is used for database and flat files

• Generate dynamic content by applying different style sheets

What is XQuery?

XQuery was designed to query XML data which is nothing but SQL for database tables. XQuery is used to fetch the data from the XML file.

What is XML Signature?

XML Signature is recommended by W3C, and it acts as a digital signature for XML documents. If the signature is contained outside the document, it is called detached signature. If it contains inside the XML document, then it is called Enveloping signature.

Can we have empty XML tags?

Yes, we can have empty tags in XML. Empty tags are used to indicate elements that have no textual content. Empty tags can be represented as



What is SGML?

SGML is large and powerful Standard Generalized markup Language which is used to define descriptions of the structure of different types of electronic document.

What is XLink and XPointer?

XLink is the standard way of creating hyperlinks in the XML files. Xpointer which allows those hyperlinks to point to more specific parts of the XML file or document.

What is Data Island?

An XML Data island is XML data embedded into a HTML page. This works only with the Internet.

What are the advantages of XML DOM Document?

Advantages of XML DOM:

• XML structure is traversable, and it can be randomly accessed by traversing the tree.

• XML structure is modifiable, and values can be added, changed and removed


Popular posts from this blog

TOP Agile Testing Interview Questions and Answers

Latest Agile Testing Interview Questions and Answers

Most Asked ADO.NET Interview Questions and Answers