# -*- coding: ISO-8859-1 -*-
#
# this tests the next API of the XmlTextReader interface
#
import libxml2
import StringIO
import sys
# Memory debug specific
if ret != 1:
print "test_next: Error reading to first element"
print "test_next: Error reading the first element"
if ret != 1:
print "test_next: Error reading to second element"
print "test_next: Error reading the second element"
if ret != 1:
print "test_next: Error reading to third element"
print "test_next: Error reading the third element"
if ret != 1:
print "test_next: Error reading to end of third element"
print "test_next: Error reading to end of second element"
if ret != 1:
print "test_next: Error moving to third element"
print "test_next: Error reading third element"
if ret != 1:
print "test_next: Error reading to end of first element"
print "test_next: Error reading the end of first element"
if ret != 0:
print "test_next: Error reading to end of document"
#
# cleanup for memory allocation counting
#
del f
del input
del reader
# Memory debug specific
print "OK"
else: