manuales:nagios:capacitacion:productos:argentina_-_afip_-_factura_electronica
Diferencias
Muestra las diferencias entre dos versiones de la página.
Última revisiónAmbos lados, revisión siguiente | |||
manuales:nagios:capacitacion:productos:argentina_-_afip_-_factura_electronica [2015/09/15 12:10] – creado cayu | manuales:nagios:capacitacion:productos:argentina_-_afip_-_factura_electronica [2015/10/16 14:58] – cayu | ||
---|---|---|---|
Línea 69: | Línea 69: | ||
?> | ?> | ||
</ | </ | ||
+ | En Python | ||
+ | <file python check_xml_afip.php> | ||
+ | # | ||
+ | import errno, sys, urllib2 | ||
+ | from xml.etree.ElementTree import XML | ||
+ | |||
+ | response = urllib2.urlopen(' | ||
+ | xml_afip = XML(response.read()) | ||
+ | |||
+ | dummy_afip = {} | ||
+ | contador = 0 | ||
+ | |||
+ | for elem in xml_afip: | ||
+ | dummy_afip[elem.tag]=elem.text | ||
+ | if elem.text != ' | ||
+ | if contador <= 0: | ||
+ | contador = 1 | ||
+ | else: | ||
+ | contador = 1 | ||
+ | |||
+ | if contador != 1: | ||
+ | print "OK - ", | ||
+ | sys.exit(0) | ||
+ | else: | ||
+ | print " | ||
+ | sys.exit(1) | ||
+ | </ | ||
+ |
manuales/nagios/capacitacion/productos/argentina_-_afip_-_factura_electronica.txt · Última modificación: 2015/11/19 14:47 por cayu