Created
June 1, 2010 06:23
-
-
Save ekoontz/420633 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Agraph_t* graphml_parse(FILE * fp) { | |
// 1. use libxml2 to (try) to parse contents | |
// of fp into a DOM. | |
return (Agraph_t*)NULL; | |
// 2. if DOM parsing was successful, convert DOM into an Agraph_t*. | |
} | |
Agraph_t *agread(FILE * fp) | |
{ | |
/* check if this is a graphml (XML) file by trying to | |
parse it with an XML DOM parser. */ | |
Agraph_t* retval; | |
if ((retval = graphml_parse(fp)) != (Agraph_t*)NULL) { | |
return retval; | |
} | |
else { | |
aglexinit(fp, (fgets)); /* use system fgets */ | |
agparse(); | |
return AG.parsed_g; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment