FossilOrigin-Name: bed8f5d737e2c2ee4507553d6de8aa788526242ce390ef630ba16578c30c7ff9
17 lines
322 B
Python
17 lines
322 B
Python
import os.path
|
|
|
|
import xmlschema
|
|
|
|
|
|
def path_for_xsd(dirname, xsdname):
|
|
data_dir = os.path.dirname(os.path.abspath(__file__))
|
|
return os.path.join(data_dir, dirname, xsdname)
|
|
|
|
UBLInvoice= xmlschema.XMLSchema(path_for_xsd('maindoc', 'UBL-Invoice-2.1.xsd'))
|
|
|
|
def validate(xml, schema):
|
|
schema.validate(xml)
|
|
|
|
|
|
|