Showing posts with label XML. Show all posts
Showing posts with label XML. Show all posts

Thursday 21 August 2014

XML Interview Questions And Answers

XML Interview Questions And Answers

What is full Form XML?
Extensible Markup Language.


What is XML?
It is text-based standard design for interchange the information between two application. There are no predefined tags and attributes in XML. you can create your own tags and attributes in tag.


Who created the XML?
Jon Bosak


Why It is so popular?
  • It is free standard for exchange information.
  • It is independent of language.
  • It is independent of Hosting Server 
  • Human Readable.
  • You can create your Own tags in XML. 
  • Used for embed images, video etc

Where XML is used?
It is used to exchange the information between two application. Information can also be exchanged between two different application which is running on different OR same server. It is used in Web Application, Mobile Application (IOS, Android, Iphone, window Phone) for providing the API. It is also used AS installer in web application, you can set the application configuration in XML file.


Why it is used?
  • It is Opensource.
  • It is easy to understand.
  • you can create your own tags. 
  • Independent of languages and OS.
  • You can embed photo, videos in XML.

What is file extension of XML?
.xml


How the raw XML file can be viewed in a browser?
Raw XML files can be viewed in Mozilla, Firefox, Opera, Internet Explorer and in Netscape. For make XML documents to display like nice web pages, you will have to add some display information.


How to parse XML in PHP?
http://www.web-technology-experts-notes.in/2013/05/parse-xml-in-php-by-example.html


What is a CDATA section in XML?
The CDATA is used when you don't want some text data be parsed by the XML parser.
<![CDATA[ HERE IS NON-PARSED DATA]]>
Now, above data will not parse.


What is XQuery?
Xquery is a query language that is used to retrieve data from XML documents. You can add, update, delete and list the XML with use of XQuery.


What i XMLA ?
It is protocol of Microsoft  for XML-messaging used for exchanging data between client and servers.


What is XSL?
XSL is a language used for expressing style sheets. An XSL style sheet is a file that describes the way to display an XML document.


What is the difference between XML and HTML?
HTML XML
Used for displaying information. Used for data representation.
HTML is used to mark up text so it can be displayed to users. XML is used to mark up data so it can be processed by computers.
HTML describes both structure (e.g. <p>, <h2>, <em>) and appearance (e.g. <br>, <font>, <i>) XML describes only content
HTML uses a fixed, unchangeable tags There is no predefined tags, you can create your own.



What are the benefits of XML?
Simplicity
Openness
Extensibility
Self-description
Contains machine-readable context information- Tags, attributes and element structure provide context information. Can embed multiple data types - XML documents can contain any possible data type - from multimedia data (image, sound, video) to active components (Java applets, ActiveX).



What is a well-formed XML document?
If a document is syntactically correct it can be called as well-formed XML documents.
Every open tag must be closed.
The open tag must exactly match the closing tag: XML is case-sensitive.
All elements must be embedded within a single root element.
Child tags must be closed before parent tags.
A well-formed document has correct XML tag syntax, but the elements might be invalid for the specified document type.



How to add CSS in XML File?
<!--xml-stylesheet type="text/css" href="/css/mystyle.css"?-->



How to add CSS in XML File?
<script>
<![CDATA[
function()
{
    any code........
}
]]>
</script>