The tool xgencode
generates class-reflections by a description file coded in XML (it generates Java classes as well to enable transfer between Java and C).
The instances are serialized with xf_instance_write() For deserialization you have to create a deserializer. The constructor (xf_new()) gets the file descriptor and a list of reflections of classes you expect. Whenever input is available on the file (or socket) you call xf_parse(), which returns an instance if input is complete for one object. The so created instance is created on the stack and has to be freed if not used any more.
The parsing routines use expat, a push-up stream parser (there is no DOM-Tree generated in memory, but the instances are filled during parsing in hook-functions, this is the fastest way)