diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2002-12-20 10:29:40 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2002-12-20 10:29:40 +0000 |
commit | 4258b9c8aa649f8bb344ff46b7886687f9659578 (patch) | |
tree | 01c776276d302aee506f5e35504bdb411505ae0e /python | |
parent | ea7751d53bf497e873dca39b2c305e300e2574f9 (diff) | |
download | android_external_libxml2-4258b9c8aa649f8bb344ff46b7886687f9659578.tar.gz android_external_libxml2-4258b9c8aa649f8bb344ff46b7886687f9659578.tar.bz2 android_external_libxml2-4258b9c8aa649f8bb344ff46b7886687f9659578.zip |
one really need to provide the base URI information when creating a reader
* doc/libxml2-api.xml python/tests/reader.py: one really need
to provide the base URI information when creating a reader parser
from an input stream. Updated the API and the example using it.
Daniel
Diffstat (limited to 'python')
-rwxr-xr-x | python/tests/reader.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/python/tests/reader.py b/python/tests/reader.py index b6efa489..be81cc24 100755 --- a/python/tests/reader.py +++ b/python/tests/reader.py @@ -8,7 +8,7 @@ libxml2.debugMemory(1) f = StringIO.StringIO("""<a><b b1="b1"/><c>content of c</c></a>""") input = libxml2.inputBuffer(f) -reader = input.newTextReader() +reader = input.newTextReader("test1") ret = reader.read() if ret != 1: print "Error reading to first element" @@ -68,7 +68,7 @@ if ret != 0: # f = StringIO.StringIO("""<test xmlns:dt="urn:datatypes" dt:type="int"/>""") input = libxml2.inputBuffer(f) -reader = input.newTextReader() +reader = input.newTextReader("test2") ret = reader.read() if ret != 1: @@ -90,7 +90,7 @@ f = StringIO.StringIO("""<root xmlns:a="urn:456"> </item> </root>""") input = libxml2.inputBuffer(f) -reader = input.newTextReader() +reader = input.newTextReader("test3") ret = reader.read() while ret == 1: @@ -109,7 +109,7 @@ if ret != 1: # f = StringIO.StringIO("""<testattr xmlns="urn:1" xmlns:a="urn:2" b="b" a:b="a:b"/>""") input = libxml2.inputBuffer(f) -reader = input.newTextReader() +reader = input.newTextReader("test4") ret = reader.read() if ret != 1: print "Error reading the testattr element" |