Best way to learn XML is to get a small book then read.
Then, use XML spy to play with it. Get a large XML document, create a DTD from it and learn about the restrictions as you play with the XML doc.
That's how I've learned. Having to merg 2-3 similar XML files under one DTD file. XML is nice, and DTDs are definatly a must. I'm quite disappointed VI didn't make any DTDs.
PS: DTDs (Data Type Definition) are basically your definition of the XML file. With a valid DTD document, you can't make an invalid XML document.