CoolInterview.com - World's Largest Collection of Interview Questions & Answers, FAQs, queries, sample papers, exam papers, dumps, what, why, how, where, when questions
Our Services
Get 9,000 Interview Questions & Answers in an eBook.




Get it now !!
Send your Resume to 6000 Companies
XML Schema Interview Questions & Answers - Learning Mode
COOLINTERVIEW.COM XML INTERVIEW QUESTIONS XML SCHEMA INTERVIEW QUESTIONS QUESTIONS & ANSWERS - LEARNING MODE

XML Schema Interview Questions & Answers - Learning Mode

An XML Schema describes the structure of an XML document. The purpose of an XML Schema is to define the legal building blocks of an XML document, the elements and attributes that can appear in a document, the number of (and order of) child elements, data types for elements and attributes, default and fixed values for elements and attributes. An XML Schema is a language for expressing constraints about XML documents. There are several different schema languages in widespread use, but the main ones are Document Type Definitions (DTDs), Relax-NG, Schematron and W3C XSD (XML Schema Definitions).

Try XML Schema Interview Questions & Answers - Exam Mode
Subcategories for XML Schema Interview Questions & Answers - Learning Mode

Following are sub categories for which Interview Questions & Answers are available under XML Schema Interview Questions & Answers - Learning Mode. Please select the appropriate sub-category:-

Snow Flake Interview Questions & Answers (0) Learning Mode | Exam Mode

Star Flake Interview Questions & Answers (0) Learning Mode | Exam Mode

1

Sort By : Latest First | Oldest First | By Rating

XML Schema Interview Questions & Answers - Learning Mode
Try XML Schema Interview Questions & Answers - Exam Mode
Question:
How you use Schema Element in XML Document?


Answer: We can say that <schema> element is an root element in XML Schema.
Now, I given you syntax of an XML Schema.
Syntax:
<?xml version="1.0"?>
<xs:schema>
....
....
</xs:schema>
Yes, Schema element can also contain attribute.
Example:
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.r4r.co.in"
xmlns="http://www.r4r.co.in"
elementFormDefault="qualified">
Source: CoolInterview.com
Question: Why we use XML Schemas?

Answer: I have given you some main reasons those made XML Schemas more powerful than DTD.
1. Using XML Schemas we can describe permissible document content more easily.
2. Using XML Schemas we can validate the rightness of data easily.
3. Using XML Schemas we can work with data that comes from database more easily.
4. Easy to switch data b/w different datatypes.
5. Easy to define data formats and to made restrictions on data.

Source: CoolInterview.com
Question:
How you define complex and simple type of element?


Answer:
In an XML Schema element are of two types.
1. Complex Type Element
2. Simple Type Element
1. Complex Type Element: Complex Type Elements are elements those contain elements.
2. Simple Type Element: Simple Type Elements are elements those doesn't contain any other elements.
I explain you complex and simple type of element with an example:
<?xml version="1.0"?>
<note>
<to>Abhi</to>
<from>Sudhi</from>
<heading>Birthd Source: CoolInterview.com
Question:
How you define attributes in XML Schema?


Answer: You have to note this in XML Schema all attributes are only declare as simple types element not as complex types.Because yes, Simple Elements has no attributes and attributes are only happen with Complex Elements.But key point is that in XML Schema always attribute declare as simple type itself.
Syntax:
<xs:attribute name="abc" type="xyz"/>

Source: CoolInterview.com
Question:
Explain why XML Schemas are Estensible?


Answer: have given you some reasons that say XML Schemas are extensible.We can Reuse our XML Schemas with in other XML Schemas.Also we can made our own data types which are derived from standard types.We can Refer multiple schemas in an same XML document.


Source: CoolInterview.com
Question: Can you please explain me about the SCHEMA? and how important it is in the payroll?

Answer: No answer available currently.
Question:
Give an example shows XML document has a reference to an XML Schema?


Answer:
This example show you how XML document has a reference to an XML Schema.
Example:
<?xml version="1.0"?>
<note>
xmlns="http://www.r4r.co.in"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.r4r.co.in note.xsd">

<to>Abhi</to>
<from>Sudhi</from>
<heading>Birthday Wish</heading>
<body>Happy Birthday Dear</body>
</note> Source: CoolInterview.com
Question: What is XML Schema?

Answer: When we don't want to use DTD than we can use XML Schema as an alternative of DTD.Using XML Schema we can describe the structure of XML document.We can also called XML Schema language as XML Schema Definition.Some main of XML Schema are given below:
1. We can define the child element among the elements.
2. XML Schema also define order and number of child element.
3. Using XML Schema we can define data types, default and fixed values for attributes and elements.
XML Schema has W3 Source: CoolInterview.com
Question:
How you define elements of XML document in an XML Schema?


Answer: Simple I given you a example of an XML document. Than I told you define elements of this XML document in an XML Schema.
Example shows a XML Document.
<?xml version="1.0"?>
<note>
<to>Abhi</to>
<from>Sudhi</from>
<heading>Birthday Wish</heading>
<body>Happy Birthday Dear</body>
</note>
Now, I will show you how to define these elements(to, from, heading, body)of XML document(saved with "note.xml")in an XM Source: CoolInterview.com
Question:
How you set Default and fixed values for attributes?


Answer:
Mean of default and fixed value interms of attributes.
Default values are those values that are directly assign to attribute when this atribute doesn't contain any other defined value.
Example:
<xs:attribute name="lang" type="xs:string" default="EN">
In the above example default value of lang is "EN".
Fixed values are those values that are directly assign to attribute but it doesn't contain any other defined value for this attribute.
Example:
<xs:at Source: CoolInterview.com
Question: What do you mean by Simple Element?

Answer: have already told you XML Schema has define elements in two types.
1. Simple Element
2. Complex Element

Simple Element: In XML simple elements are those element that has contain only text doesn't contain any other elements or attributes.
Text may be of any type that define in XML Schema
like boolean,string,date etc.
Syntax:
<xs:element name="abc" type="xyz"/>

where, abc is used to define name of element and xyz is used to define data type of element.CoolInterview.com
Question: How we can say XML Schemas are successors of DTDs?


Answer: Because of some reasons we can say that XML Schemas area successors of DTDs.Some reasons are given below:
1. As DTD, XML Schemas also written in XML.
2. As DTD, XML Schemas also support Data types and namespaces.
But, XML Schemas is much good as DTDs.Because it is much richer and powerful than DTDs.And it also has some features that are made to solve problems comes in future.



Source: CoolInterview.com

1



India News Network
Latest 20 Questions
Payment of time- barred debt is: (a) Valid (b) Void (c) Illegal (d) Voidable
Consideration is defined in the Indian Contract Act,1872 in: (a) Section 2(f) (b) Section 2(e) (c) Section 2(g) (d) Section 2(d)
Which of the following is not an exception to the rule, "No consideration, No contract": (a) Natural love and affection (b) Compensation for involuntary services (c) Completed gift (d) Agency
Consideration must move at the desire of: (a) The promisor (b) The promisee (c) The promisor or any other party (d) Both the promisor and the promisee
An offer which is open for acceptance over a period of time is: (a) Cross Offer (b) Counter Offer (c) Standing Offer (d) Implied Offer
Specific offer can be communicated to__________ (a) All the parties of contract (b) General public in universe (c) Specific person (d) None of the above
_________ amounts to rejection of the original offer. (a) Cross offer (b) Special offer (c) Standing offer (d) Counter offer
A advertises to sell his old car by advertising in a newspaper. This offer is caleed: (a) General Offer (b) Special Offer (c) Continuing Offer (d) None of the above
In case a counter offer is made, the original offer stands: (a) Rejected (b) Accepted automatically (c) Accepted subject to certain modifications and variations (d) None of the above
In case of unenforceable contract having some technical defect, parties (a) Can sue upon it (b) Cannot sue upon it (c) Should consider it to be illegal (d) None of the above
If entire specified goods is perished before entering into contract of sale, the contract is (a) Valid (b) Void (c) Voidable (d) Cancelled
______________ contracts are also caled contracts with executed consideration. (a) Unilateral (b) Completed (c) Bilateral (d) Executory
A offers B to supply books @ Rs 100 each but B accepts the same with condition of 10% discount. This is a case of (a) Counter Offer (b) Cross Offer (c) Specific Offer (d) General Offer
_____________ is a game of chance. (a) Conditional Contract (b) Contingent Contract (c) Wagering Contract (d) Quasi Contract
There is no binding contract in case of _______ as one's offer cannot be constructed as acceptance (a) Cross Offer (b) Standing Offer (c) Counter Offer (d) Special Offer
An offer is made with an intention to have negotiation from other party. This type of offer is: (a) Invitation to offer (b) Valid offer (c) Voidable (d) None of the above
When an offer is made to the world at large, it is ____________ offer. (a) Counter (b) Special (c) General (d) None of the above
Implied contract even if not in writing or express words is perfectly _______________ if all the conditions are satisfied:- (a) Void (b) Voidable (c) Valid (d) Illegal
A specific offer can be accepted by ___________. (a) Any person (b) Any friend to offeror (c) The person to whom it is made (d) Any friend of offeree
An agreement toput a fire on a person's car is a ______: (a) Legal (b) Voidable (c) Valid (d) Illegal
Cache = 0.214844 Seconds