XML in a Nutshell

It's like HTML, but with user-definable elements

  • Well, mostly.
  • Example:
     <package name="swig">
         <version>1.3</version>
         <homepage>http://www.swig.org</homepage>
         <author>David Beazley</author>
     </package>
     

DTDs

  • A DTD is a formal specification of the elements and attributes that are allowed

XML Parsing

  • Non-validating parsers. Check for valid structure, but don't verify DTD.
  • Validating parsers. Check for valid structure and for DTD compliance.
<<< O'Reilly OSCON 2001, New Features in Python 2, Slide 63
July 26, 2001, beazley@cs.uchicago.edu
>>>