From af510a6cfc095758d34187b1ac092874d59d3e72 Mon Sep 17 00:00:00 2001 From: hyzboy Date: Wed, 14 Oct 2020 12:28:37 +0800 Subject: [PATCH] add GetExpatError function. --- inc/hgl/util/xml/XMLParse.h | 1 + src/xml/XMLParseClass.cpp | 66 ++++++++++++++++++++++++++++++++++++- 2 files changed, 66 insertions(+), 1 deletion(-) diff --git a/inc/hgl/util/xml/XMLParse.h b/inc/hgl/util/xml/XMLParse.h index 01dd65f..7be3e41 100644 --- a/inc/hgl/util/xml/XMLParse.h +++ b/inc/hgl/util/xml/XMLParse.h @@ -26,6 +26,7 @@ namespace hgl namespace xml { const UTF8String GetExpatVersion(); + const char *GetExpatError(int); constexpr int XML_PARSE_BUFFER_SIZE=HGL_SIZE_1KB*128; ///XML_ERROR_INVALID_ARGUMENT) + return xml_error_code[0]; + + return xml_error_code[code+1]; + } + namespace { void XMLStartElement(ElementParse *ep,const XML_Char *name,const XML_Char **atts) @@ -177,7 +241,7 @@ namespace hgl *row=XML_GetErrorLineNumber(xml); *col=XML_GetErrorColumnNumber(xml); } - + /** * 解晰一个XML文件 */