diff options
Diffstat (limited to 'libxml/xml.h')
-rw-r--r-- | libxml/xml.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/libxml/xml.h b/libxml/xml.h index 9670837..acc1a95 100644 --- a/libxml/xml.h +++ b/libxml/xml.h @@ -73,12 +73,24 @@ class XMLParser : public XMLLocator /*! Destructor */ ~XMLParser(); + using Transcode = bool(std::string &,const char *); + /*! Parses a file gives the contents of the file as a string. * @param fileName the name of the file, used for error reporting. * @param inputString the contents of the file as a zero terminated UTF-8 string. * @param debugEnabled indicates if debugging via -d lex is enabled or not. + * @param debugStart hook that is to be called before starting with parsing + * @param debugEnd hook that is to be called after finishing with parsing + * @param transcoder hook that is to be called when transcoding text to UTF-8 */ - void parse(const char *fileName,const char *inputString,bool debugEnabled); + void parse(const char *fileName, + const char *inputString, + bool debugEnabled, + std::function<void()> debugStart, + std::function<void()> debugEnd, + std::function<Transcode> transcoder = + [](std::string&s,const char *){ return true; } + ); private: virtual int lineNr() const override; |