X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/9fd7fdefa9de8b8932cd4c3951792f80ba91b676..7cd2e930f9665432a3bfa725b90bf3c0a3cb5617:/gui/articulos.c 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; } }