Skip to Content

Getting started with XML: Part I (XML and DTD)

As a Netweaver XI learner I see XML everywhere. Wherever there is transfer of data it follows the format of XML. Either it is being adapter configuration or conversion of any data all is done in the form of XML. After seeing the importance of XML in SAP I thought of writing a blog on it.

XML and Document Type Definition (DTD)?

XML is a markup language which can have user defined tags instead of predefined tags to create other markup languages, and the DTD is the part of XML which help to describe the language.

Even though this is my very first blog, I hope that the given information about XML and DTD will really be helpful to many people especially who are not very much aware about DTD and XML. After discussing XML and DTD in this blog I will be talking about XML Schema in the next one.

You must be Logged on to comment or reply to a post.
  • Instead of multiple blogs about XML, how about making it into a wiki which can then be built on by other members of the community?

    That way people don’t have to find all the blogs and can get a complete set of information about XML, XSD, XPath, xcetera in one place.

    I think it would also be useful to put XML and its friends into the XI/PI context – such as mentioning where XSD can be used in the IB etc.


    • Hello Michael,

      Thats an brilliant idea about putting all related things of XML under one heading.

      After writing my next blog on XSD,Schema, I am looking forward to post it in wiki.

      Subhasha Ranjan

  • Hi Subasha:
    Your blog is very nice, precise and specific.
    Even being new to XML world it gave me a little bit clear picture about the language.


  • Hi,
       I find this blog as foundation for the XML/XSD/DTD newbees. I would like to know more about the usage of (i.e. when to use) DTD or XSD.


  • Hello,

    There is a long battle between two schools of thinking.. one cheering for DTD and the other of XSD. Personally i feel DTD is the thing of the post. There are many serious flaws with DTD. But on the same coin DTD has some features that are not in XSD. If one would have been following this battle, it would be evident that XSD has won the battle. All the major software provides have embrased XSD over DTD.

    If you are planning on writting more blogs please be aware of this fact and put some emphasis into XSD. DTD is the thing of the past and XSD is the future.

    1. DTD’s are not namespace aware.

    2. DTD’s have #define, #include, and #ifdef — or, less C-oriented, the ability to define shorthand abbreviations, external content, and some conditional parsing.

    3. A DTD describes the entire XML document (even if it leaves “holes”); a schema can define portions.

    1. XSD has a type system.

    2. XSD has a much richer language for describing what element or attribute content “looks like.”  This is related to the type system.

    3. You can put a DTD inline into an XML document, you cannot do this with XSD.  This means DTD’s are more secure (you only have to protect one bytestream — the xml/dtd — and not multiple).


    • Hi Naveen,

           Thanks for this valuable feedback. Sure, I will put more emphasis on XSD in my next blog and will also write that why do we prefer XML Schema instead of DTD.

      Subhasha Ranjan