30#ifndef __NCML_MODULE__SAX_PARSER_WRAPPER_H__
31#define __NCML_MODULE__SAX_PARSER_WRAPPER_H__
34#include <libxml/parserInternals.h>
59class SaxParserWrapper {
70 NOT_PARSING = 0, PARSING, EXCEPTION, NUM_STATES
84 xmlSAXHandler _handler;
90 xmlParserCtxtPtr _context;
100 std::string _errorMsg;
102 std::string _errorFile;
106 SaxParserWrapper(
const SaxParserWrapper&);
107 SaxParserWrapper& operator=(
const SaxParserWrapper&);
115 explicit SaxParserWrapper(
SaxParser& parser);
116 virtual ~SaxParserWrapper();
127 bool parse(
const std::string& ncmlFilename);
152 return _state == EXCEPTION;
179 void cleanupParser() noexcept;
Base exception class for the BES with basic string message.
bool parse(const std::string &ncmlFilename)
Do a SAX parse of the ncmlFilename and pass the calls to wrapper parser.
bool isExceptionState() const
void deferException(BESError &theErr)
The remaining calls are for the internals of the parser, but need to be public.
int getCurrentParseLine() const
Interface class for the wrapper between libxml C SAX parser and our NCMLParser.
NcML Parser for adding/modifying/removing metadata (attributes) to existing local datasets using NcML...