Project

Profile

Help

Bug #6372 » saxonc12xmlparse-test1.py

Martin Honnen, 2024-03-15 16:14

 
from saxonche import PySaxonProcessor, PySaxonApiError

with PySaxonProcessor() as saxon_proc:
print(saxon_proc.version)
xml_doc = saxon_proc.parse_xml(xml_file_name='sample1.xml')
print(xml_doc)
try:
xml_doc = saxon_proc.parse_xml(xml_file_name='windows-notepad-ansi-sample1.xml')
print(xml_doc)
except PySaxonApiError as e:
print(e)
(1-1/3)