Converting GraphML to GV or Dot file
Asked Answered
P

1

7

How can I draw a graph in graphviz using "graphml" file as an input.
I know graphviz comes with graphml2gv for this purpose but when I try to run this command from command prompt I get this message
cvtgxl: not configured for conversion from GXL to GV

Prothalamium answered 3/7, 2014 at 12:44 Comment(0)
P
3

Your copy of Graphviz was compiled without the Expat library (to redress, install Expat and recompile after running ./configure --with-expat=yes).

cmd/tools/graphml2gv.c:

#ifdef HAVE_EXPAT
    initargs(argc, argv);
    while ((inFile = getFile())) {
    while ((G = graphml_to_gv(nameOf(gname, gcnt), inFile, &rv))) {
        gcnt++;
        if (prev)
        agclose(prev);
        prev = G;
        if (Verbose) 
        fprintf (stderr, "%s: %d nodes %d edges\n",
            agnameof (G), agnnodes(G), agnedges(G));
        agwrite(G, outFile);
        fflush(outFile);
    }
    }
    exit(rv);
#else
    fputs("cvtgxl: not configured for conversion from GXL to GV\n", stderr);
    exit(1);
#endif
Petry answered 31/7, 2015 at 8:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.