Click to See Complete Forum and Search --> : Any C parsing tutorials out there?


saturn-vk
01-14-2005, 11:00 AM
Does anyone know of any parsing tutorials in C, preferably for xml & gtk, so I can use xml style config files for my program? I've looked into g_markup_parse_context_* but I have no idea how to use it. It should be all I need, but I couldn't figure out how it does things. So could someone point me out to a simple example that uses this or any other method of parsing xml (a really simple one is all I need, that shows me how the file is parsed and different variables are obtained)

madcompnerd
01-14-2005, 01:10 PM
libxml2 should work well for you, I wrote my own code for it and it wasn't too rough, few hundred lines-ish for something to handle strings and ints with few attributes.
But as long as you don't need massive files, libxml2 is probably what you want. Google for it, it should have semi-crappy documentation.