Asked at: * https://github.com/libexpat/libexpat/issues/148 * https://www.c-plusplus.net/forum/234446-full * https://mail.python.org/pipermail/expat-discuss/2002-July/000544.html Current best answer: * Build on top of Expat yourself using a start/element handler * See https://github.com/libexpat/libexpat/blob/master/expat/doc/reference.html#L751 also * (https://github.com/01org/opa-fm may have code to do just that at some point)