Sunday, 7 April 2019

16 - XML Interview questions



      1.  What is XML?
       Ans. XML stands for "Extensible Markup Language”. It must have a .xml extension. Its case sensitive markup language.

       2. What is the difference between HTML and XML?
       Ans.
       1. HTML has its own defined tags while XML has no specific tag.
       2. HTML may not contain closing tag but for XML its necessary to close tag.
       3. HTML is not case sensitive but XML is case sensitive.
       4. HTML document must have an htm or html extension while XML document must have xml extension.
     
      3. What is the version in XML?
      Ans. XML version shows which version of XML is used.

4. What are rules to write the XML document?

      Ans. 
             It should have a root element.
             Spaces are not allowed in tag names.
             All tags must be closed.
             All tags must be nested properly.
             Attributes value should appear in quotes.

5. Is XML case sensitive?

       Ans. Yes

6. What is attribute in XML?

       Ans. Attribute provides more information about an element.
`              <Employee name="Sapna">
                Here name is the attribute.

7. Can we have empty XML tags?

       Ans. Yes, empty XML tags define that elements have no textual content.  

8. What is XQuery?

       Ans. XQuery is a query language which is used to fetch data from XML document.
       
       9. Which namespace is used to work with class XmlReader?
       Ans. using System.Xml;

 10. How comment is represented in XML?

       Ans. <!- –  XML comments – ->

 11. What is XML namespace?

       Ans. XML namespace is used to avoid conflict between two tags of the same name but the different sources.XML namespace is defined using xmlns attribute at the top of the XML document.

       12. Is XML,SGML,HTML same thing?

       Ans. No

13. How Soap is related to XML?

       Ans. Soap (Simple object access protocol) uses XML to define a protocol to exchange data in distributed servers.

 14. What is XML DOM?

       Ans. XML DOM stands for Document Object Model which describes the logical structure of the XML.

15. What is XSL?

      Ans. XSL stands for the Extensible Stylesheets Language which describes how to display XML document.

16. Which language is used to describe web service in XML?
Ans. WSDL

No comments:

Post a Comment

Thanks

SQL server tricky questions