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

Why we use anonymous methods in c#?

493


What is instantiating a class in c#?

484


What does break do in loop?

492


What is ioc containers c#?

448


Can we declare private class in c#?

480






What is public void in c#?

509


What is hashtable in c# with example?

495


Define mutex in C#?

615


Is an array an object c#?

539


3. Use layered architecture for coding. s.no name description 1 abc xxxxxxxxx 2 abc xxxxxxxxx 3 4 5 6 7 8 Select all Clear all Add Delete Name Description Save close

1456


Why do we need a singleton class?

505


What is cookies c#?

485


Difference between directcast and ctype.

537


What is string [] args in c#?

542


What is datetime parse in c#?

517