How to choose between DTD and XSD

前端 未结 7 2131
南旧
南旧 2020-12-02 10:37

I want to use either a DTD or an XSD to describe my XML document. I\'ve read that XSDs are better than DTDs since they support namespaces and data types, and that DTDs are o

7条回答
  •  [愿得一人]
    2020-12-02 11:06

    XML Schema can perform more complex validations. E.g if DTD checks the datatype of an XML element is integer or string.XML schema can perform more complicated validations like if the xml element is a string starting with uppercase letter or a positive integer. Finally XML schema uses XML syntax and its a natural choice for development of web services.

提交回复
热议问题