YouTube Icon

Interview Questions.

Top 100+ XSD Interview Questions And Answers - May 24, 2020

fluid

Top 100+ XSD Interview Questions And Answers

Question 1. How You Define Attributes In Xml Schema?

Answer :

You need to be aware this in XML Schema all attributes are only claim as easy kinds element not as complex types. Because yes, Simple Elements has no attributes and attributes are only appear with Complex Elements. But key factor is that during XML Schema usually attribute claim as easy type itself.

Syntax:

<xs: attribute name="abc" type="xyz"/>

Question 2. How You Use Schema Element In Xml Document?

Answer :

We can say that <schema> element is an root element in XML Schema.

Now, I actually have 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"

target Namespace="http://www.R4r.Co.In"

xmlns="http://www.R4r.Co.In"

elementFormDefault="qualified">

....

....

</xs: schema>

XML Interview Questions

Question three. How You Define Complex And Simple Type Of Element?

Answer :

In an XML Schema element are of  types.

    Complex Type Element
    Simple Type Element

Complex Type Element: Complex Type Elements are elements the ones include elements.

Simple Type Element: Simple Type Elements are factors the ones don’t comprise any other elements.

I provide an explanation for you complicated and simple sort of element with an example:

<? Xml version="1.0"?>

<note>

<to>Abhi</to>

<from>Sudhi</from>

<heading>Birthday Wish</heading>

<body>Happy Birthday Dear</body>

</note>

In the above example observe detail called as complex detail as it includes elements(to, from, heading, body).And element to, from, heading and frame referred to as as Simple Type Element because it would not comprise some other detail.

Question 4. Give An Example Shows Xml Document Has A Reference To An Xml Schema?

Answer :

This instance show you how XML file 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-example"

xsi:schemaLocation="http://www.R4r.Co.In observe.Xsd">

<to>Abhi</to>

<from>Sudhi</from>

<heading>Birthday Wish</heading>

<body>Happy Birthday Dear</body>

</note>

XML Tutorial

Question five. Why We Use Xml Schemas?

Answer :

I have given you some most important motives those made XML Schemas greater powerful than DTD.

    Using XML Schemas we are able to describe permissible record content more easily.
    Using XML Schemas we will validate the rightness of facts without difficulty.
    Using XML Schemas we are able to paintings with facts that comes from database greater without difficulty.
    Easy to switch records b/w extraordinary datatypes.
    Easy to outline records formats and to made restrictions on statistics.

Oracle Interview Questions

Question 6. 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 make our own records types which can be derived from widespread sorts. We can refer multiple schemas in a same XML document.

Question 7. What Is Xml Schema?

Answer :

When we don't need to use DTD than we will use XML Schema as an opportunity of DTD.Using XML Schema we are able to describe the structure of XML document. We can also name XML Schema language as XML Schema Definition.

Some major of XML Schema are given underneath:

    We can define the child detail among the elements.
    XML Schema also defines order and quantity of child detail.
    Using XML Schema we can define records sorts, default and stuck values for attributes and elements.

XML Schema has W3C Recommendation due to the fact 02 May 2001.

XPath Tutorial SQL Interview Questions

Question 8. How You Define Elements Of Xml Document In An Xml Schema?

Answer :

Simple I come up with a instance of an XML report. Then I instructed you outline factors of this XML file 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 display you a way to define those factors(to, from, heading, frame)of XML document(stored with "note.Xml")in an XML Schema (stored with "be aware.Xsd").

<? Xml version="1.0"?>

<xs: schema xmlns:xs="http://www.W3.Org/2001/XMLSchema"

target Namespace="http://www.R4r.Co.In"

xmlns="http://www.R4r.Co.In"

elementFormDefault="qualified">

<xs:element name="note">

<xs:complexType>

<xs:sequence>

<xs: element name="to" type="xs: string"/>

<xs: element name="from" type="xs: string"/>

<xs: element name="heading" type="xs: string"/>

<xs: element name="body" type="xs: string"/>

</xs: sequence>

</xs: complexType>

</xs: element>

</xs: schema>

Question nine. How You Set Default And Fixed Values For Attributes?

Answer :

Mean of default and glued price in phrases of attributes.

Default values are the ones values which can be directly assigned to attribute when this attribute does not incorporate some other described fee.

Example:

<xs: attribute name="lang" type="xs: string" default="EN">

In the above example default price of Lang is "EN".

Fixed values are those values which can be directly assigned to characteristic but it would not contain some other described value for this characteristic.

Example:

<xs: attribute name="lang" type="xs: string" fixed="EN"/>

In the above example constant cost of Lang is "EN".

Oracle E-Bussiness Suite Interview Questions

Question 10. How We Can Say Xml Schemas Are Successors Of Dtds?

Answer :

Because of a few reasons we are able to say that XML Schemas region successors of DTDs.

Some reasons are given below:

    As DTD, XML Schemas additionally written in XML.
    As DTD, XML Schemas also help Data sorts and namespaces.

But, XML Schemas is much correct as DTDs.Because it's far much richer and powerful than DTDs.And it additionally has a few functions that are made to resolve problems comes in destiny.

XQuery Tutorial

Question 11. What Do You Mean By Simple Element?

Answer :

Have already informed you XML Schema has described elements in two kinds.

    Simple Element
    Complex Element

Simple Element: In XML easy factors are that element that has comprise handiest textual content would not contain every other factors 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 outline name of detail and xyz is used to outline facts sort of element.




CFG