R4R
Right Place For Right Person TM
 
R4R XML FAQS XML Subjective Questions And Answers

 



Tolal:70 Click: 1 2 3 4
Previous Home Next

XML Interview Questions And Answers

Page 1

Ques: 1 What is the XML? Explain it.

Ans:
XML is stands for eXtensible Markup Language.It is invented by World Wide Web Consortium(W3C). Don't Confuse with that HTML and XML are same.For efficient use of XML you should know HTML and JavaScript.I have given you some basic features of XML. 1.It is called extensible because using XML you can create own tags as per requirement. 2.XML is used to communicate and store the data,not to show the data. 3.Using XML we can identify our information in a more accurate, flexible and adaptable way. 4.It is used to make about structural information of data. 5.XML is a Metalanguage(Language use for describing other language.)

Ans:
XML stand for EXtensible Markup Language.

Ques: 2 How we can say XML is differ from HTML?

Ans:
Both XML(eXtensible Markup Language) and HTML(Hyper Text Markup Language)are markup languages.But they are different.I have given you some main difference b/w XML and HTML given below. 1.The key difference is that XML is used for to store data and made communication b/w them.Where HTML is used to present the data in attractive way. 2.In XML we emphasize on 'what data is'. Where as in HTML we emphasize on 'What data looks like'. 3.In HTML tag semantic and tag set are fixed means that in HTML their is no made our own tags.where as in XML these are not fixed so, can we made our own tags as per requirement. 4.XML is dynamic where as HTML is static. 5.HTML is case sensitive language where as XML is non-case sensitive language. 6.In XML it is mandatory to close all open tags where as in HTML their is not mandatory to close all open tags.

Ques: 3 What do you understand about XML Namespaces and Linking?

Ans:
I have you some information about XML Namespaces and XML Linking. XML Namespaces: XML give as facility to make our own tags. Suppose if we want add element of two XML sheets their may be conflicts. But if we made our own tags than it can solve the problem of data conflicts,because different tags may contain the same type of data. XML Linking: Using XML linking we can create the connection among the XML data means they can communicate each other. XML Linking(XML Link,XML Pointer & XML Base) Where, XML Link is used to insert link into XML Sheets. XML Pointer is used to link the address of some specific data in XML sheets. XML Base is used to defining a default reference to external XML resources.

Ques: 4 What do you understand about XPath?

Ans:
XPath is stands for XML Path Language.That is used to addressed the element of XML Document.In XML document we define our data in terms of tree.It is used to address the element and their attribute at any level.I have given you a example this shows how to address parts of XML. Example: /xyz:Employeedatabase/xyz:Empname/@EmpID Using above we can address the EmpID.

Ques: 5 What you define SAX in XML?

Ans:
SAX is stands for Simple API for XML.It is a lexical and event-driven interface.Implementation of SAX is fast and efficient but we can't extract information from XML at random.It is good for use when some types of information ewe handle in same way always without knowing that where it execute in document. How to use SAX in XML: # Use to get a list of known parsers my $parsers = XML::SAX->parsers(); # Use to add/update a parser XML::SAX->add_parser(q(XML::SAX::PurePerl)); # Use to remove parser XML::SAX->remove_parser(q(XML::SAX::Foodelberry)); # Use to save parsers XML::SAX->save_parsers()

Ques: 6 How you define DOM in XML?

Ans:
DOM is stands for Document Object Model.It is used to represent data in terms of node of tree. It is an interface given by W3C DOM Workgroup used to access,parse or update XML data.We make DOM document either by parser or manually by user.Data types that we used in DOM Nodes are abstract.DOM also supported java

Ques: 7 How SAX is different than DOM?

Ans:
We use DOM for internal presentation of XML.It is good for small XML file but bad for large files because when we use DOM for large file it present whole filw into the memory.Where SAX is work on perticular event so,it can use to find out the specific element of XML doc.It can not present data of XML.It works from top to bottom in XML file. We can't use SAX without DOM.

Ques: 8 How you define XMLA?

Ans:
XMLA stands for XML Analysis Services.It is designed to generate reports of data that was contained in data warehouse.It does not create relation between the data structure.In XML we Use XMLA to show the analysis service data to outer world.

Ques: 9 What is XHTML?

Ans:
XHTML is stands for eXtensible HTML.It is a combination of HTML4 with XML rules means when we using XHTML than when we open any tag it should has an end tag and we write attribute value with in single quote or double quote.

Ques: 10 what do you know about XML parser?

Ans:
It is a COM component.Microsoft give XML Parser with interner explorer 5 or higher version of internet explorer.After that parser is avail with scripts.XML Parser has many function using them we can traverse the tree,access the nodes with their values.also using them we can insert,delete the nodes and after that it will changed to XML. Using that code we can made the instance of XML Parser with JavaScript. var xmlDoc=new ActiveXObject("Microsoft.XMLDOM") Can made instanceof XML Parser with VBScript set xmlDoc=CreateObject("Microsoft.XMLDOM") Can made instance of XML Parser in anASP page. set xmlDoc=Server.CreateObject("Microsoft.XMLDOM") Using this code we can load the XML document into the XML Parser. <script type="text/javascript"> var xmlDoc=new ActiveXObject("Microsoft.XMLDOM") xmlDoc.async="false" xmlDoc.load("note.xml") *** *** *** </script>

Ques: 11 How XML support UNICODE characters ?

Ans:
Generally XML doesn't support UNICODE character. But this makes possible when we using some techniques in XML.These techniques are given below: <?xml version="1.0" encoding="windows-1252"?> <?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-16"?>.

Ques: 12 How to create an XML Document? Explain it with example.

Ans:
We you again in XML we can create our own tags.I have given you a XML example given below. Example: <?xml version="1.0" encoding="ISO-8859-1"?> <note> <to>abhi</to> <from>vivek</from> <heading>Welcome</heading> <body>Hi! R4R Welcomes you.At this Place you can check or improve your intelligency. </body> </note> When we see this code we can easily understand that vivek send a message to abhi.Because we uses to and from self defined tags.

Ques: 13 How XML support TREE Structure?

Ans:
In XML document we called root element to the parent node and create other child tags with in the root.So,It creates a structure like tree.In this tree starts at the root and branches made at the lowest level of the tree.I have given you a example which shows a tree structure.Syntax:<root> <child> <subchild>.....</subchild> </child></root>Example:<bookstore><book category=\"JAVA\"> <title lang=\"en\">The Complete Reference</title> <author>Herbert Schildt</author> <year>2005</year> <price>30.91</price> </book><book category=\"C++\"> <title lang=\"en\">Programming in ANSI C++</title> <author>E Balaguruswamy</author> <year>2007</year> <price>38.99</price> </book><book category=\"C\"> <title lang=\"en\">Exploring C</title> <author>Yashwant kanetkar</author> <year>2006</year> <price>42.95</price> </book></bookstore> Above, I have started with bookstore category. It is called root node.Than after create a child node like:book.Than creates the attributes like:title,author,year and price attributes and assign values to them.This is look like a tree shape structure.

Ques: 14 Write some basic rules of XML?

Ans:
I think their is no problem comes when we using XML rules.Because XML has no pre-defined tags.so, it can easy implement and made logical arranged data.Some basic rules of XML given below.Keep in mind when you creating any XML document. Rule1: ALL tags that you open should have been closed.Like:<Welcome>......</Welcome> Rule2:XML Tags are Case-Sensitive.So,if you create tag like:<Welcome> than you can't closed this tag with </welcome>.You should write </Welcome>. Rule3:XML element should be properly nested. Example:<R4R><Welcome>.......</R4R></Welcome> is false. <R4R><Welcome>.......</Welcome></R4R> Rule4:Document should have a root node. <root> <child> <subchild>.....</subchild> </child> </root> Rule5:We should the attribute values. <note date="03/02/2008"> <to>abhi</to> <from>vivek</from> </note>

Ques: 15 How to define XML Element?

Ans:
Everything inside the open and closed tag is called as XML Element.It may be contain other element and text or may be a combination of both. I have given you example which help you to understanding element in XML. <bookstore> <book category="JAVA"> <title lang="en">The Complete Reference </title> <author>Herbert Schildt</author> <year>2005</year> <price>30.91</price> </book> <book category="C++"> <title lang="en">Programming in ANSI C++</title> <author>E Balaguruswamy</author> <year>2007</year> <price>38.99</price> </book> <book category="C"> <title lang=\"en\">Exploring C</title> <author>Yashwant kanetkar</author> <year>2006</year> <price>42.95</price> </book> </bookstore> Above,bookstore and book both are element content where as title,author,year and price are text content.book also called as attribute and JAVA,C++ and C is the value of book attribute.

Ques: 16 How you define attributes in XML?

Ans:
We define attribute in XML as same as HTML.But keep one thing in mind In XML every attribute should have a value,We can't make attribute without value in XML.Where as in case of HTML we can create attribute without value. Example: <student active="true"> <name>Abhi</name> <grade>A</grade> </student> In above example 'student' is a element,'active' is a attribute and 'true' is a attribute value. <student active> <name>Abhi</name> <score>75</score> </student> This is wrong in case of XML because in this we declare attribute 'active' without any value.But it will run in case of HTML.

Ques: 17 How you define XML Entity?

Ans:
Using Entity we can represent the information in symbolic form. Syntax: When we write entity in the XML.We start with ampersand(&),after that write name than after write semicolon(;) &entity_name; Here,I am writing a syntax to create XML entities. <!ENTITY entityname "write information according to entity."> Example: <!ENTITY welcomenote "Hello,I am Vivek.R4R welcome you! and enjoy after getting membership of R4R."> Further,I given you a example how to use a XML entity. Example: <!ENTITY welcomenote "Hello,I am Vivek.R4R welcome you! and enjoy after getting membership of R4R."> <email> <to>client</to> <body>&welcomenote;</body> </email>

Ques: 18 How to write comment in XML?

Ans:
We use comment in XML to temporary write the note or want some code to edit on XML document.Some time writing a comment is very necessary for program. XML does not provide any special method for writing a comment it is same as HTML.Below I have given a code how to write comment on XML. Example: <?xml version="1.0" encoding="ISO-8859-15"?> <!-- Student that marks on half yearly exam --> <class_student_list> <student> <name>Hariom</name> <score>70%</score> </student> <student> <name>Abhi</name> <score>75%</score> </student> </class_student_list> Below I have given you a example in this i have remove some data about student temporarily. Example: <?xml version="1.0" encoding="ISO-8859-15"?> <!-- Student that marks on half yearly exam --> <class_student_list> <student> <name>Hariom</name> <!-- <score>70%</score> --> </student> <student> <name>Abhi</name> <!-- <score>75%</score> --> </student> </class_student_list> In this I have remove score temporarily.

Ques: 19 How you define DTD in XML?

Ans:
DTD is stands for Document Type Definition.This is the oldest schema for XML.It is present every where in the XML 1.0.I have you reasons those make DTD limited. 1.It does not new features of XML.Like:namespaces.2.It lacks expressiveness.We can\'t captured the formal aspects of XML doc.3.DTD uses a custom non-XML syntax,inherited from SGML. Example: <!ELEMENT people_list (person*)> <!ELEMENT person (name, age?, sex?, phoneno?)> <!ELEMENT name (#PCDATA)> <!ELEMENT age (#PCDATA)> <!ELEMENT sex (#PCDATA)> <!ELEMENT phoneno (#PCDATA)>

Ques: 20 What is the XML prolog?

Ans:
IN XML their is no mandatory to use prolog it is optional.But if we want to use than it comes before the root element in XML.prolog has two parts these are, 1.XML Declaration 2.Document Type Declaration We can use both parts at same time,alone or not mandatory to use.


Goto Page:

1 2 3 4
Share |

XML Objective

XML Objective Questions And Answers

XML Interview Questions And Answers

XML Interview Questions And Answers

R4R,XML Objective, XML Subjective, XML Interview Questions And Answers,XML,XML Interview,XML Questions ,XML Answers

New Updates

R4R
R4R
R4R
R4R
R4R
R4R
R4R
R4R