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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

To catch any possible exception What is the C# syntax written ?

615


What is desktop GUI application?

584


What are virtual classes in c#?

620


Why do we need singleton pattern in c#?

580


Is it good to use var in c#?

532






What type of data type conversion happens when the compiler encounters the following code?

632


What is interface inheritance?

613


Explain the access modifiers in c#?

579


What is the difference between “dispose” and “finalize” variables in c#?

571


explain Garbage collector’s functionality on unmanaged code

606


Explain the difference between const and static read-only?

589


What is the difference between static and constant variables?

622


How many keyword present in C# language ?

646


i want the csharp questions&answeres

1571


Does c# have primitives?

545