Wednesday 3 August 2011

XML Interview Questions

1) Explain and describe about XML?
XML is defined as an extensible markup language because it gives the user to define his own elements. It facilitates transfer and sharing of structure data across various platforms and particularly through internet. It is also used to serialize and encode data.
 
2) Write about well formed and valid XML documents?
There are two levels of correctness for an XML document they are
1) Well formed XML documents
2) Correctness document
A well formed document is one which has appropriate starting and closing tags and it should primarily meet the standards laid out in the XML guidelines. In a well formed document well a conforming parser is not allowed to parse it.
A valid document contain additional rules such as user defined guidelines, XML schema, DTD, Guidelines laid down as per the rules and regulation present in the format. A validating parser is not allowed to parse it.
 
3) Explain about the DTD features?
This is the oldest form of format for XML is DTD. The full form for DTD is document type definition and it is inherited from SGML. It can be said that inclusion of DTD has increased the popularity of XML but DTD has its share of limitations.
1) DTD does not have features to support new inclusions such as namespaces.
2) Certain aspects of XML do not correlate with DTD.
3) Due to its inheritance from SGML it uses a non XML syntax.

4) Explain about the techniques for processing XML files?
There are traditional techniques to process XML files and out of these some of them are.
1) Using SAX API and a programming language
2) Using DOM API and a programming language
3) Using filter and transformation engine
4) Data parsing and pull parsing are also used for convenience.

5) State some advantages of XML
 These are some of the main advantages of XML.
1) XML is text based
2) Information written in human language can be understood by XML due to its Unicode structure.
3) This is used for formatting language and data either offline or online.
4) It supports most of the documents
5) It is platform independent which makes it very easy to use.

6) State some disadvantages of XML?
These are some of the disadvantages regarding XML
1) XML syntax is large when compared to binary representations and is redundant.
2) Due to redundancy it occupies much higher memory and this increases costs on transmission, storage and processing costs.
3) Overlapping relationships require extra effort.
4) XML namespaces are problematic and namespace support can be difficult to implement in XML.

7) Explain about XML data binding?
XML data binding allows the user to access the information in XML format rather than in the format of DOM. Data is referred and stored in the computer memory as an object in the form of an XML document. Some information requires different approach to store it in the format of an object. As the data contains links it is always not easy to preserve the data in the form of an object.
 
8) Explain about DOM interface?
DOM interface and its specifications are modulated by world wide consortium. DOM allows the user to transfer the entire content of a document into an object. In DOM the entire package is loaded into the memory and then it is modulated into nodes of tree after which the entire document is converted into an object which makes it easier.
 
9) Explain about XML namespaces?
Namespaces are guided by the guidelines of w3c. These are used to uniquely identify the named elements and attributes of an XML document. As XML supports human interpreted language and structure it is necessary for namespaces to differentiate different elements present in an XML document. It is declared using XML attribute xmlns and the value of it should be Uniform resource identifier.
 
10) How do you display XML with XSLT?
XSLT is the recommended style sheet for XML and it is very popular. To display XML with XSLT one has to convert XML into HTML before displaying it in the browser. Different browsers interpret XSLT in different ways which makes it a necessary to amend changes to XSLT on the server.

11) State and explain about XML encoding errors?
When loading an XML document you have two kinds of errors they are
1) Invalid character found
2) Switch from current encoding
You would obtain an invalid character found error if your XML document contains non ASCII characters. When your document contains ASCII characters make sure that you save the document as ASCII characters with encoding
Switch from current encoding is obtained if your XML was saved as double byte where the actual specification for the document was single byte.
 
12) Describe about the syntax rules which form the XML documents?
Some of the basic syntax rules which are to be implemented are
1) XML documents should have a root element
2) They should have a closing tag
3) Make sure that you type exact case, as these documents are case sensitive.
4) These elements should be properly nested
5) Attribute elements must be quoted correctly.
 
13) Explain about XQuery?
Xquery is a useful query language which is designed to query XML data and it is very useful in making changes to query. Its subset is Xpath. This XQuery is formed from the experts of w3c. This facilitates extraction of data from many different databases. This can be rightly said that in future it will be used as SQL.
 
14) State some features of XQuery.
Some of the features which are present in XQuery language are as follows: -
1) Logical and physical data independence
2) Declarative
3) High level
4) Side effect free
5) Strongly typed language
 
15) Explain about XML signature?
XML signature is recommended by w3c. It acts as a digital signature for XML documents. This technology is used by various technologies such as SAML, SOAP, etc. You can use this technology whenever you can access a specific XML document in a URL. If the signature is contained outside the document then it is called as a detached signature. When it is contained inside the document then it is called as enveloping signature.
 
16) Explain about XML Canonicalization?
Often it happens that documents are identical in many different ways either logical of statistical. It becomes a major problem when you try to sign a digital signature on two identical documents, to eliminate this problem you have to use Canonicalization which helps people in identifying two similar documents with similar digital signature. Similar documents use Canonicalization to identify similar patterns and signature.
 
17) Explain about core validation?
During the process of XML validation two processes are followed which are
1) Reference validation and
2) Signature validation
Record digest value is used to verify digital signature. In signature validation a process called Canonicalization is used, in this key info is used to verify the signature.

0 comments:

Post a Comment

Popular Posts

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | cheap international calls