XML Interview Questions and Answers
Question - 31 : - What is XPath?
Answer - 31 : -
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.
Question - 32 : - Can we have empty XML tags?
Answer - 32 : -
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
Question - 33 : - What are the advantages of XML DOM Document?
Answer - 33 : -
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
Question - 34 : - What is well formed XML document?
Answer - 34 : -
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
Question - 35 : - What is an XML Schema?
Answer - 35 : -
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
Question - 36 : - What is XSL?
Answer - 36 : -
XSL is a language used with XML for expressing style sheets as like CSS. It describes how to display an XML document for a given type.
Question - 37 : - What is XML Parser?
Answer - 37 : -
XML Parser is used to convert from XML document into an XML DOM object which can be written in Javascript.
Question - 38 : - What are XML Namespaces?
Answer - 38 : -
XML namespaces are used to avoid element name conflicts, and it can be avoided by using prefix before the name.
Question - 39 : - How comment can be represented in XML?
Answer - 39 : -
Comment can be represented as as like HTML. This comment symbol is applicable for single or multiple lines.
Question - 40 : - What is CDATA?
Answer - 40 : -
CDATA is unparsed character data that cannot be parsed by the XML parser. Character < and > are illegal in XML elements. CDATA section starts with ”.