Course PYT103
Introduction to Python XML Document Processing
Introduction to Python XML Document Processing
Duration: 2 Days
Synopsis
The course provides a thorough introduction to XML and use of the SAX and DOM APIs for XML Document processing.
In addition the course will cover:
- Converting CSV files into XML documents, and vice versa
- Converting results of database queries into XML documents
- Saving XML documents into relational database tables
- Saving the results of logfile analysis as XML documents
Prerequisites
- Attendees are expected to be experienced Python programmers and to have some familiarity with Regular Expressions, and with Python database programming.
- No knowledge of XML is assumed, however familiarity with simple web application development and HTML is useful.
Publicly scheduled dates, locations, and prices
A schedule of dates for this subject is not currently available. Please call Ajay Patel on 02086471939 to enquire about places and availability.
Contents
Foundations of XML
- Rationale underlying XML
- Core markup concepts
- Tags
- Documents
- Document Prolog
- Elements
- Entities
Using XML to Model Information
- Simple data storage
- Narrative documents
- Complex data
- Using XML to describe documents and media
Document Type Definition (DTD)
XML Schema
Using Python to generate XML Documents
Parsing documents using SAX (Simple API for XML)
- How SAX works
- Overview of the xml.sax module
- Creating handlers derived from the ContentHandler class
- Principles of SAX document parsing in Python
- Using SAX to extract information from documents
- Searching an XML document files
- Creating index tables as XML documents
- Using SAX to convert XML documents to HTML
DOM - Document Object Model
- Overview of the DOM specfication
- DOM level 2 and DOM level 3
- Overview of the xml.dom package
- Working with xml.dom's minidom lightweight DOM implementation
- Overview of 4Suite's 4DOM full DOM implementation
- Determining the type of a node
- Retrieving the children of a node
- Retrieving the siblings of a node
- Extracting elements by name
- Adding, moving and deleting nodes - to restructure XML documents
- Case study implementing a web and XML based document server
