Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: 080daa04f1636224f2b0aeb34de80482a6d2496b authored by cvs2svn on 11 April 2000, 17:11:09 UTC
This commit was manufactured by cvs2svn to create tag 'r16a2'.
Tip revision: 080daa0
test_xmllib.py
'''Test module to thest the xmllib module.
   Sjoerd Mullender
'''

from test_support import verbose

testdoc = """\
<?xml version="1.0" encoding="UTF-8" standalone='yes' ?>
<!-- comments aren't allowed before the <?xml?> tag,
     but they are allowed before the <!DOCTYPE> tag -->
<!DOCTYPE greeting [
  <!ELEMENT greeting (#PCDATA)>
]>
<greeting>Hello, world!</greeting>
"""

import xmllib
if verbose:
	parser = xmllib.TestXMLParser()
else:
	parser = xmllib.XMLParser()

for c in testdoc:
	parser.feed(c)
parser.close()
back to top