Following the usual cookbook examples, my app parses an open file as
follows::
parser = xml.sax.make_pa rser()
parser.setFeatu re(xml.sax.hand ler.feature_ext ernal_ges,1)
# Hopefully the content handler can figure out the encoding from the <?xml>
element.
handler = saxContentHandl er(c,inputFileN ame,silent)
parser.setConte ntHandler(handl er)
parser.parse(th eFile)
Can anyone tell me how the content handler can determine the encoding of the
file? Can sax provide this info?
Thanks!
Edward
--------------------------------------------------------------------
Edward K. Ream email: edreamleo@chart er.net
Leo: http://webpages.charter.net/edreamleo/front.html
--------------------------------------------------------------------
follows::
parser = xml.sax.make_pa rser()
parser.setFeatu re(xml.sax.hand ler.feature_ext ernal_ges,1)
# Hopefully the content handler can figure out the encoding from the <?xml>
element.
handler = saxContentHandl er(c,inputFileN ame,silent)
parser.setConte ntHandler(handl er)
parser.parse(th eFile)
Can anyone tell me how the content handler can determine the encoding of the
file? Can sax provide this info?
Thanks!
Edward
--------------------------------------------------------------------
Edward K. Ream email: edreamleo@chart er.net
Leo: http://webpages.charter.net/edreamleo/front.html
--------------------------------------------------------------------
Comment