Google

Interview Questions Test your java skills Java API Reference Notifications Java Forums Java Examples Tell a Friend
Link to us Donate
Javagalaxy.com WWW
Subscribe Un Subscribe

Java Interview Questions on your mobileNew            

Java Interview Questions - JavaGalaxy.com

  Java Interview Questions                       Is your Interview Question not answered here? Send it to webmaster@javagalaxy.com, we will answer it.

    Search Interview Questions 

  Displaying     Interview Questions and answers.

  Please click here to give us Feedback / Suggestions on how we can improve Java interview questions and answers

 
 Question   What is SOAP?  (XML)  Discuss in Detail (QID: 620)
 Answer    The Simple Object Access Protocol (SOAP) uses XML to define a protocol for the exchange of information in distributed computing environments. SOAP
consists of three components: an envelope, a set of encoding rules, and a convention for representing remote procedure calls.

 Question   What is the difference between DOM and SAX? What would you use if an option is given?  (XML)  Discuss in Detail (QID: 569)
 Answer    DOM parses an XML document and returns an instance of org.w3c.dom.Document. This document object's tree must then
be "walked" in order to process the different elements. DOM parses the ENTIRE Document into memory, and then makes it
available to you. The size of the Document you can parse is limited to the memory available.

SAX uses an event callback mechanism requiring you to code methods to handle events thrown by the parser as it
encounters different entities within the XML document. SAX throws events as the Document is being parsed. Only the
current element is actually in memory, so there is no limit to the size of a Document when using SAX.

The specific parser technology that will be used will be determined by the requirements of your application. If you need the
entire document represented, you will most likely use DOM builder implementation. If you only care about parts of the
XML document and/or you only need to parse the document once, you might be better served using SAX implementation.

 Question   Is it possible to write the contents of org.w3c.dom.Document object into an .xml file?  (XML)  Discuss in Detail (QID: 568)
 Answer    Yes its possible. One to achieve this is by using Xerces. Xerces is an XML parser. You would use the following code

org.apache.xml.serialize.OutputFormat format = new org.apache.xml.serialize.OutputFormat(myDocument);
org.apache.xml.serialize.XMLSerializer output = new org.apache.xml.serialize.XMLSerializer(new FileOutputStream(new File("test.xml")), format);
output.serialize(myDocument);

 Question   Why is XML such an important development?  (XML)  Discuss in Detail (QID: 27)
 Answer    It removes two constraints which were holding back Web developments:<br> 1. § dependence on a single, inflexible document type (HTML) which was being much abused for tasks it was never designed for;<br> 2. the complexity of full SGML, whose syntax allows many powerful but hard-to-program options.<br> § XML allows the flexible development of user-defined document types. It provides a robust, non-proprietary, persistent, and verifiable file format for the storage and transmission of text and data both on and off the Web; and it removes the more complex options of SGML, making it easier to program for.

 
First Previous Showing 891 - 894 of 894 Records    Jump to page number       Current page number: 90

Displaying records per page

   - Discussions are available

Copyright © 2002 - 2010 JavaGalaxy.com,
All Rights Reserved Advertise| Feedback| Contact us| Terms of Use| Privacy Policy|

Help us to keep serving you better.
If you find any part of this site useful please support the site by linking to us