README-PyXML.txt

changeset 0
de9c2efb9d02
equal deleted inserted replaced
-1:000000000000 0:de9c2efb9d02
1 PyXML has a problem calculating the datasize of the data read from an XML file.
2 In order to correct this, make the adjustment shown below.
3
4 Near the end of method parse_xml_decl (in PyXML 0.8.3 this is at line
5 723) in _xmlplus.parsers.xmlproc.xmlutils:
6
7 try:
8 self.data = self.charset_converter(self.data)
9 self.datasize = len(self.data) ### ADD THIS LINE
10 except UnicodeError, e:
11 self._handle_decoding_error(self.data, e)
12 self.input_encoding = enc1
13
14 Here is the change as a diff.
15
16 --- _xmlplus/parsers/xmlproc/xmlutils.py.orig        2006-11-13 11:30:07.768059659 +0100
17 +++ _xmlplus/parsers/xmlproc/xmlutils.py     2006-11-13 11:30:38.871925067 +0100
18 @@ -720,6 +720,7 @@ class XMLCommonParser(EntityParser):
19              # to the recoding.
20              try:
21                  self.data = self.charset_converter(self.data)
22 +                self.datasize = len(self.data)
23              except UnicodeError, e:
24                  self._handle_decoding_error(self.data, e)
25              self.input_encoding = enc1

eric ide

mercurial