commit c9fd82850e8a8c10c563299669fcb2a6ff1bd464 Author: JotaChina Date: Sat May 17 13:36:53 2025 -0300 Enviar arquivos para "/" diff --git a/mmp.xsd b/mmp.xsd new file mode 100644 index 0000000..adf8301 --- /dev/null +++ b/mmp.xsd @@ -0,0 +1,491 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/validate.py b/validate.py new file mode 100644 index 0000000..9194cae --- /dev/null +++ b/validate.py @@ -0,0 +1,17 @@ +from lxml import etree + +xml_file = 'teste.mmp' +xsd_file = 'mmp.xsd' + +with open(xsd_file, 'rb') as f: + schema_doc = etree.XML(f.read()) +schema = etree.XMLSchema(schema_doc) + +with open(xml_file, 'rb') as f: + doc = etree.XML(f.read()) + +if schema.validate(doc): + print("XML válido!") +else: + print("XML inválido!") + print(schema.error_log)