Explain DTD

A document type definition (DTD) describes the permissible tags of an XML document. The DTD serves as a data template. It defines entities, elements, attributes, and notations, as well as the relationships between these. For example, the DTD can state that a memo element consists of To, From, Subject, and Message elements. You need to [...]

Is an XML schema an alternative to DTD

Schemas are becoming more popular and DTDs less so. A schema is an XML-based syntax for describing how the XML document is marked up or how it looks – very similar to a DTD, but a DTD has a lot of drawbacks.A DTD doesn’t use anything like XML syntax to describe the definition. You can’t [...]

Explain XML Namespaces

An XML namespace is a collection of element names or attribute names to be defined within an XML document.Let’s say you have an invoice XML document and an order XML document and you want to put them together. You usually have certain names that overlap each other – like the date. You might have an [...]

What are the advantages of XML

XML is free form which means that you can configure it any way you want. It’s also very easy to read – you don’t have to read cryptic code to figure it out.It was designed specifically for internet protocols, and this makes it simple to transmit an XML document across, for example, a HTTP protocol.Strong [...]

Differences between DTD and Schema

  XML Schema DTD Markup validation Any global element can be root. No ambiguous content support. Can specify only the root element in the instance document. No ambiguous content support. Namespace support Yes. Declarations only where multiple namespaces are used. No. Code reuse Can reuse definitions using named types. Poorly supported. Can use parameter entities. [...]

What are the disadvantages of DTD

They are not written in XML syntax, which means you have to learn a new syntax in order to write them there is no support for namespaces there are no constraints imposed on the kind of character data allowed, so datatyping is not possible there is minimal support for code modularity and none for inheritance [...]

Follow

Get every new post delivered to your Inbox.