+ tmp = NULL;
+ count = 0;
+ node = node->children;
+ while (node) {
+ if (node->type == XML_ELEMENT_NODE) {
+ if (strcmp(node->name, "ITEMVENTA") == 0) {
+ count++;
+ tmp = realloc(tmp, sizeof(t_Item)*count);
+ memset(&tmp[count-1], '*', sizeof(t_Item));
+ prop = xml_get_prop(node, "NroArtículo");
+ tmp[count-1].numero = atoi(prop);
+ xmlFree(prop);
+ strcpy(tmp[count-1].cv, prop = xml_get_prop(node, "CV")); xmlFree(prop);
+ strcpy(tmp[count-1].pvu, prop = xml_get_prop(node, "PVU")); xmlFree(prop);
+ }
+ }
+ node = node->next;
+ }
+ *cant = count;