Fix usage of XML error functions.