Incremental XML parser in plain C