Validate xml improvements

This will break backward compatibility, as it changes the function's return value from a bool_or_string to a (bool, ErrorLog) tuple. I think it's fair to say that the function was broken in the first place, so a backward incompatible change isn't horrible.
Exit status codes are usually `0-255`. Most applications return `1` for a generic `EXIT_FAILURE` status.