XML Parser

(Bob Wall)


Hi, Rocky,

In case people are still wondering how to parse XML, and they are using C or C++, I have a little program that uses the expat parser. It just runs through the file and spits out the elements, attributes, and values that it finds - but it might be a useful starting point. It's based on the SAX paradigm - event-driven, rather than sucking the entire document in and building a parse tree. The source is in ~bwall/CS550/expat_parse.c on esus. It can be build by just doing gcc -o expat_parse expat_parse.c -lexpat

I also have the corrected versions of all three XML files there, if you want to share them with people.

Later, Bob