|
INTERVIEW QUESTIONS
XML
XML SCHEMA
DETAILS
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"> .... .... </xs:schema> In the above example "http://www.w3.org/2001/XMLSchema" namespace use to show us datatype that we used in this XML Schema.
targetNamespace="http://www.r4r.co.in" is used to define elements(note, to, from, heading, body) comes from http://www.r4r.co.in namespace in this XML Schema.
xmlns="http://www.r4r.co.in" is used to show the default namespace.
elementFormDefault="qualified"> use to show that all element that we used by XML instance document has qualified namespace.
|
|
|
Category |
XML Schema Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.3) By 8078 users |
Added on |
4/28/2014 |
Views |
68157 |
Rate it! |
|
|
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"> .... .... </xs:schema> In the above example "http://www.w3.org/2001/XMLSchema" namespace use to show us datatype that we used in this XML Schema.
targetNamespace="http://www.r4r.co.in" is used to define elements(note, to, from, heading, body) comes from http://www.r4r.co.in namespace in this XML Schema.
xmlns="http://www.r4r.co.in" is used to show the default namespace.
elementFormDefault="qualified"> use to show that all element that we used by XML instance document has qualified namespace.
Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
Give an example shows XML document has a reference to an XML Schema?
|
View Answer
|
|
How you define complex and simple type of element?
|
View Answer
|
|
How you define elements of XML document in an XML Schema?
|
View Answer
|
|
Explain why XML Schemas are Estensible?
|
View Answer
|
|
Why we use XML Schemas?
|
View Answer
|
|
How we can say XML Schemas are successors of DTDs?
|
View Answer
|
|
What is XML Schema?
|
View Answer
|
|
Can you please explain me about the SCHEMA? and how important it is in the payroll?
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All XML Schema Interview Questions & Answers - Exam Mode /
Learning Mode
|