X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/9fd7fdefa9de8b8932cd4c3951792f80ba91b676..a1a3dc9f23281f1e4efdc2fe54a0d1b0ddc8aac3:/gui/articulos.c?ds=sidebyside diff --git a/gui/articulos.c b/gui/articulos.c index 81bb207..28c0cc1 100644 --- a/gui/articulos.c +++ b/gui/articulos.c @@ -13,7 +13,7 @@ t_LstArticulos *art_cargar(const char *filename) t_LstArticulos *tmp = (t_LstArticulos *)malloc(sizeof(t_LstArticulos)); if (tmp == NULL) return NULL; - document = xmlParseFile(filename); + document = xmlReadFile(filename, "ISO-8859-1",0); if (document == NULL) { free(tmp); return NULL; @@ -65,13 +65,13 @@ t_LstArticulos *art_cargar(const char *filename) for ( ; node ; node = node->next) { if (node->type == XML_ELEMENT_NODE) { if (strcmp(node->name, "ARTICULO") == 0) { - strncpy(tmp->array[cant].numero, xmlGetProp(node, "NroArticulo"), 8); - strncpy(tmp->array[cant].desc, xmlGetProp(node, "Descripcion"), 50); - strncpy(tmp->array[cant].presentacion, xmlGetProp(node, "Presentacion"), 30); + strncpy(tmp->array[cant].numero, xmlGetProp(node, "NroArtículo"), 8); + strncpy(tmp->array[cant].desc, xmlGetProp(node, "Descripción"), 50); + strncpy(tmp->array[cant].presentacion, xmlGetProp(node, "Presentación"), 30); strncpy(tmp->array[cant].existencia, xmlGetProp(node, "Existencia"), 8); -// strncpy(tmp->array[cant].ubicacion, xmlGetProp(node, "Ubicacion"), 30); +// / strncpy(tmp->array[cant].ubicacion, xmlGetProp(node, "Ubicacion"), 30); strncpy(tmp->array[cant].pvu, xmlGetProp(node, "PVU"), 8); - strncpy(tmp->array[cant].emin, xmlGetProp(node, "Emin"), 8); + strncpy(tmp->array[cant].emin, xmlGetProp(node, "Emín"), 8); ++cant; } }