display | more...

expat is an non-validating XML parser by Jim Clark. It's written in C and it's very small. You can download it from http://www.jclark.com/xml/expat.html. It's the one being used in Mozilla.

It's an event oriented parser, meaning that it will send you an event for each XML syntatic item, in the same way lex will do that with each token. Then, it's your responsibility to keep state, e.g. by using a stack and pushing something whenever you receive a tag. The advantage of this approach is that an XML file can be processed without loading it into memory.

A DOM like parser which can be more convenient is the one included in Gnome's libxml2.

"expat" is also short for "expatriate" (usually someone who works in a foreign country) for those of us in the know.

Log in or register to write something here or to contact authors.