mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
The usual.
This commit is contained in:
parent
65e5399081
commit
548703a1b8
43 changed files with 2463 additions and 2323 deletions
25
Lib/dos-8x3/test_xml.py
Normal file
25
Lib/dos-8x3/test_xml.py
Normal file
|
@ -0,0 +1,25 @@
|
|||
'''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()
|
Loading…
Add table
Add a link
Reference in a new issue