Compare DTD with schema in XML

An XML document can be validated against a schema or a DTD. The schema or the DTD defines how the elements in the XML document should be organized within the XML document. If you compare the DTD with the Schema, the schema has more advantages over DTD. So it is better to use a schema in the place of a DTD.


_______________________________________________

A DTD can have two types of data in it, namely the CDATA and the PCDATA. The CDATA is not parsed by the parser whereas the PCDATA is parsed. In a schema you can have primitive data types like you have used in programming.

String, integer, floating point numbers and even data types like country codes and languages can be used if you are using a schema. Since most of the latest technologies like web services, and XSLT are based on the schema, it is wise to adopt the schema instead of the DTD.

Apart from the primitive data types you use, you can also create custom data types based on the primitive data types according to your requirements.




_______________________________________________

FREE Subscription

Subscribe to our mailing list and receive new articles
through email. Keep yourself updated with latest
developments in the industry.

Name:
Email:

Note : We never rent, trade, or sell my email lists to
anyone. We assure that your privacy is respected
and protected.

_______________________________________




 

 

FREE Subscription

Stay Current With the Latest Technology Developments Realted to XML. Signup for Our Newsletter and Receive New Articles Through Email.

Name:

Email:

Note : We never rent, trade, or sell our email lists to anyone. We assure that your privacy is respected and protected.

 

 

Add to My Yahoo!

Visit XML Training Material Guide Homepage

 

 

Copyright - © 2004 - 2017 - All Rights Reserved.