- fact.numero = atoi(xml_get_prop(node, "NroFac"));
- fact.procdoi = atof(xml_get_prop(node, "PorcDoI"));
- fact.numero_remito = atoi(xml_get_prop(node, "NroRemito"));
- strcpy(fact.emision, xml_get_prop(node, "FechaEmisión"));
- strcpy(fact.vencimiento, xml_get_prop(node, "FechaVto"));
- strcpy(fact.estado, xml_get_prop(node, "Estado"));
- strcpy(fact.fp, xml_get_prop(node, "FP"));
- strcpy(fact.ctacte, xml_get_prop(node, "NroCtaCte"));
- strcpy(fact.cheque, xml_get_prop(node, "NroCheque"));
+ prop = xml_get_prop(node, "NroFac");
+ fact.numero = atoi(prop); xmlFree(prop);
+ prop = xml_get_prop(node, "PorcDoI");
+ fact.procdoi = atof(prop); xmlFree(prop);
+ prop = xml_get_prop(node, "NroRemito");
+ fact.numero_remito = atoi(prop); xmlFree(prop);
+ strncpy(fact.emision, prop = xml_get_prop(node, "FechaEmisión"), 8); xmlFree(prop);
+ fact.emision[8] = '\0';
+ strncpy(fact.vencimiento, prop = xml_get_prop(node, "FechaVto"), 8); xmlFree(prop);
+ fact.vencimiento[8] = '\0';
+ strncpy(fact.estado, prop = xml_get_prop(node, "Estado"), 2); xmlFree(prop);
+ fact.estado[2] = '\0';
+ strncpy(fact.fp, prop = xml_get_prop(node, "FP"), 2); xmlFree(prop);
+ fact.fp[2] = '\0';
+ strncpy(fact.ctacte, prop = xml_get_prop(node, "NroCtaCte"), 5); xmlFree(prop);
+ fact.ctacte[5] = '\0';
+ strncpy(fact.cheque, prop = xml_get_prop(node, "NroCheque"), 18); xmlFree(prop);
+ fact.cheque[18] = '\0';