Initial commit

This commit is contained in:
Tristan Roux
2019-12-05 18:00:46 +01:00
commit 8aaeea8ee4
4 changed files with 75 additions and 0 deletions

25
xmlparser.c Normal file
View File

@@ -0,0 +1,25 @@
/*
** EPITECH PROJECT, 2019
** MUL_my_runner_2019
** File description:
** xmlparser
*/
#include "xml.h"
#include "xmlstate.h"
#include <stdio.h>
node *xmlparse(char *path)
{
FILE *file = fopen(path, "r");
char *line = NULL;
xmlstate state;
if (!file)
return (NULL);
while ((line = getline(line, 0, file))) {
xml_parseline(state, line);
}
fclose(file);
return (state.valid);
}