Correct function name in error messages.
Add documentation.
Don't export fromXMLM.