We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da9f892 commit 4224a3fCopy full SHA for 4224a3f
python/drv_libxml2.py
@@ -146,7 +146,10 @@ def parse(self, source):
146
reader = libxml2.newTextReaderFilename(source)
147
else:
148
source = saxutils.prepare_input_source(source)
149
- input = libxml2.inputBuffer(source.getByteStream())
+ stream = source.getCharacterStream()
150
+ if stream is None:
151
+ stream = source.getByteStream()
152
+ input = libxml2.inputBuffer(stream)
153
reader = input.newTextReader(source.getSystemId())
154
reader.SetErrorHandler(self._errorHandler,None)
155
# configure reader
0 commit comments