[Melbourne-pm] Documenting XML Data

Rick Measham rickm at isite.net.au
Mon Oct 18 20:34:43 CDT 2004


I'm writing up a project document and want to describe some XML data. I
figure a DTD would be the most 'correct' way to describe XML data.

Am I right? The document is a programmers spec so the fact that it isn't
in plain English is not such a problem. They should be able to
understand a DTD (and this one is MEGA simple)

If it's the way to go, then what format should I provide? The following
format is one that I've seen used inline in an XML file. Should I use
that or should I break it out as if it was in a separate file?

<!DOCTYPE rply [
   <!ELEMENT rply (subject,body)>
   <!ELEMENT subject (#PCDATA)>
   <!ELEMENT body (#PCDATA)>
]>

>From what I understand from some stuff I've read, the above DTD should
describe this piece of XML:

<rply>
   <subject>The note's subject goes here</subject>
   <message>The note's message goes here</message>
</rply>

Any help greatly appreciated. Normally I've only ever created XML ..
I've never got into the 'higher' stuff like DTD let alone all the other
stuff!

Cheers!
Rick





More information about the Melbourne-pm mailing list