e-xml: Add C api

Makes it easier to use with C projects (especially those that don't allow C++ code)
There is no good way - it's an occupational hazard. I'm happy to leave with your original version.