You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
391 B
15 lines
391 B
'''
|
|
Created on 24/06/2015
|
|
|
|
@author: danimar
|
|
'''
|
|
|
|
def validar_schema():
|
|
arquivo_esquema = ''
|
|
xml = tira_abertura(self.xml).encode('utf-8')
|
|
|
|
esquema = etree.XMLSchema(etree.parse(arquivo_esquema))
|
|
esquema.validate(etree.fromstring(xml))
|
|
|
|
namespace = '{http://www.portalfiscal.inf.br/nfe}'
|
|
return "\n".join([x.message.replace(namespace, '') for x in esquema.error_log])
|