R
Ralf Schmitt
Hi,
is there a way to register entity definitions with a sax parser?
I want the following program to work without specifying an DTD in the
xml document.
from xml.sax import handler, make_parser
class Parser(handler.ContentHandler):
def startElement(self, name, attrs):
print name, attrs['foobar']
doc = '''<?xml version="1.0"?>
<note bla="ä"></to>
</note> '''
make_parser().feed(doc).close()
Thanks for any help,
- Ralf
is there a way to register entity definitions with a sax parser?
I want the following program to work without specifying an DTD in the
xml document.
from xml.sax import handler, make_parser
class Parser(handler.ContentHandler):
def startElement(self, name, attrs):
print name, attrs['foobar']
doc = '''<?xml version="1.0"?>
<note bla="ä"></to>
</note> '''
make_parser().feed(doc).close()
Thanks for any help,
- Ralf