Staging
v0.5.1
Revision 5db862dd0cae0077b09a765220bb358e0e129449 authored by Guido van Rossum on 10 April 2000, 12:46:51 UTC, committed by Guido van Rossum on 10 April 2000, 12:46:51 UTC
1 parent fa972c9
Raw File
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