This chapter provides tutorial notes and example codes on XSD (XML Schema Definition). Topics include introduction to XSD (XML Schema Definition); using schema location attribute to associate a schema to an XML document; specifying XML elements, attributes and entities declaration statements inside or outside XML files; validating XML files against XSD schemas.