I have a massive XML file that I need to parse into C.
thats just a small sample code of the XML. So i want to extract the Node, x,y,z.Code:<node id="4700-Z$0" x="322" y="-505" z="0.0" /> <node id="4701" x="356" y="-454" z="0.0" /> <node id="4702-H" x="402" y="-456" z="0.0" /> <node id="4704" x="400" y="-428" z="0.0" /> <node id="4705" x="455" y="-426" z="0.0" />
Into something like..
I tried looking at the libxml2 but can't get it to build, and I don't think I need it for something somewhat simple for this... I think?Code:typedef struct{ char node[10]; int x; int y; int z; } graphJ;



LinkBack URL
About LinkBacks





If this program is actually going to be used more than once, for sure look into libmxml. I've used it before too (thanks to zacs7!) and would highly recommend it. libexpat is good too.