Home > Articles

Deitel Presents Parsing XML with xml.sax in Python Programming

  • Print
  • + Share This
This Deitel™ article discusses how to process an XML document using the Simple API for XML (SAX). We present a small XML document and implement a Python class that can parse the document with the SAX, using features from the Python standard library. The Python program enables the user to enter the filename of an XML document and a tag name and then searches the document for any matching tags.

This Deitel™ article discusses how to process an XML document using the Simple API for XML (SAX). We present a small XML document and implement a Python class that can parse the document with the SAX, using features from the Python standard library. The Python program enables the user to enter the filename of an XML document and a tag name and then searches the document for any matching tags. Readers should be familiar with basic python, exception handling, object-oriented programming (e.g., classes and inheritance) and XML The code examples included in this article show readers programming examples using the Deitel™ signature Live-Code™ Approach, which presents all concepts in the context of complete working programs followed by the screen shots of the actual inputs and outputs.

View the entire article in PDF format.

  • + Share This
  • 🔖 Save To Your Account

Related Resources

There are currently no related titles. Please check back later.