Contrast DTDs versus XSDs. What are their similarities and differences? Which is preferred and why ?



Contrast DTDs versus XSDs. What are their similarities and differences? Which is preferred and why ?..

Answer / saxena

Document Type Definition (DTD) describes a model or set of rules for an XML document. XML Schema Definition (XSD) also describes the structure of an XML document but XSDs are much more powerful.
The disadvantage with the Document Type Definition is it doesn’t support data types beyond the basic 10 primitive types. It cannot properly define the type of data contained by the tag.
An Xml Schema provides an Object Oriented approach to defining the format of an xml document. The Xml schema support most basic programming types like integer, byte, string, float etc., We can also define complex types of our own which can be used to define a xml document.
Xml Schemas are always preferred over DTDs as a document can be more precisely defined using the XML Schemas because of its rich support for data representation.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

What is delegates in c#?

0 Answers  


What are the access-specifiers available in c#?

26 Answers   Syntel,


why c# is pronounced as C-sharp instead of pronouncing it as C-hash? is there any technical reason behind it?

3 Answers  


Valuetype/reference type?

6 Answers   Microsoft,


What is firstordefault c#?

0 Answers  






What is the namespace for the thread class?

0 Answers  


What is dependency injection?

0 Answers  


What is the functionality of break and continue in Visual Studio?

2 Answers   JPMorgan Chase,


What are collections in c#?

0 Answers  


What is difference between method overriding and method overloading?

0 Answers  


Explain About remoting and web services. Difference between them

0 Answers   Microsoft,


What is an indexer in c#?

0 Answers  


Categories