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

Describe ways of cleaning up objects in c#.

0 Answers  


Explain the difference between the debug class and trace class?

0 Answers  


what is uniary operators and binary operators and what is the difference

1 Answers   Protech,


What is polymorphism in c sharp?

0 Answers  


What is string concatenation?

0 Answers  






Can we inherit an interface in an abstract class?

6 Answers   HCL,


What is difference between write and writeline in c#?

0 Answers  


What is thread and explain states of a thread in c#?

0 Answers  


When Should You Call The Garbage Collector In .net?

0 Answers   Siebel Systems,


Which attribute adorn a test class to be picked up by the NUnit GUI in the NUnit test framework?

0 Answers   Siebel,


Can non-default constructors be used with single call sao?

0 Answers  


If I return out of a try/finally in c#, does the code in the finally-clause run?

0 Answers  


Categories