Sign In/My Account | View Cart  
advertisement

Article:
 Using SAX for Proper XML Output
Subject: Listing 1 Problems
Date: 2003-11-13 09:44:08
From: J Chik

Hi there!
Just starting to learn XML (with Python) and I ran into problems running listing 1. I get the following error
<?xml version="1.0" encoding="utf-8"?>
<log> File "./SAX-output-test.py", line 62, in ?
xl.write_entry(2, u"Vanilla log entry")
File "./SAX-output-test.py", line 45, in write_entry
self._logger.startElementNS((None, u'entry'), u'entry', attrs)
File "/usr/lib/python2.2/xml/sax/saxutils.py", line 103, in startElementNS
name = self._current_context[name[0]] + ":" + name[1]
KeyError


I am currently using Mandrake 8.2 which has Python 2.2 installed. Enjoy your column alot!


John


Previous Message Previous Message   Next Message No Next Message


Full Text Titles Only Newest First

Sponsored By: