Isis Developer Reference
IsisXMLHandler.h
Go to the documentation of this file.
1 #ifndef IsisXMLHandler_h
2 #define IsisXMLHandler_h
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 
10 #include <xercesc/sax2/DefaultHandler.hpp>
11 
12 namespace XERCES = XERCES_CPP_NAMESPACE;
18 class IsisXMLHandler : public XERCES::DefaultHandler {
19  using XERCES::DefaultHandler::ignorableWhitespace;
20 
21  public:
22 
23  ContentHandler *prevDocHandler;
24  ErrorHandler *prevErrorHandler;
25 
27 
28  IsisXMLHandler(char *PencodingName,
29  bool &PexpandNamespaces,
30  XERCES::SAX2XMLReader* &Pparser,
31  QString *chars);
32 
33  IsisXMLHandler(char *PencodingName,
34  bool &PexpandNamespaces,
35  XERCES::SAX2XMLReader* &Pparser);
36 
38 
39  void endDocument();
40 
41  void endElement(const XMLCh *const uri,
42  const XMLCh *const localname,
43  const XMLCh *const qname);
44 
45  void characters(const XMLCh *const chars,
46  const XMLSize_t length);
47 
48  void ignorableWhitespace(const XMLCh *const chars,
49  const unsigned int length);
50 
51  void processingInstruction(const XMLCh *const target,
52  const XMLCh *const data);
53 
54  void startDocument();
55 
56  void startElement(const XMLCh *const uri,
57  const XMLCh *const localname,
58  const XMLCh *const qname,
59  const XERCES::Attributes &attributes);
60 
61 
62  // SAX ErrorHandler interface
63  void warning(const XERCES::SAXParseException &exception);
64  void error(const XERCES::SAXParseException &exception);
65  void fatalError(const XERCES::SAXParseException &exception);
66 
67 
68  private:
69 
70  // Saved argument from the constructor
71  char *encodingName;
72  bool expandNamespaces;
73  XERCES::SAX2XMLReader *parser;
74  QString *value;
75  int outputEndTag;
76 };
77 
78 
79 #endif
IsisXMLHandler.h
IsisXMLHandler::warning
void warning(const XERCES::SAXParseException &exception)
Definition: IsisXMLHandler.cpp:94
IsisXMLHandler::endDocument
void endDocument()
Definition: IsisXMLHandler.cpp:116
IsisXMLHandler::prevDocHandler
ContentHandler * prevDocHandler
Definition: IsisXMLHandler.h:23
IsisXMLHandler::~IsisXMLHandler
~IsisXMLHandler()
Definition: IsisXMLHandler.cpp:74
IsisXMLHandler::ignorableWhitespace
void ignorableWhitespace(const XMLCh *const chars, const unsigned int length)
Definition: IsisXMLHandler.cpp:137
IsisXMLHandler::fatalError
void fatalError(const XERCES::SAXParseException &exception)
Definition: IsisXMLHandler.cpp:86
IsisXMLHandler::error
void error(const XERCES::SAXParseException &exception)
Definition: IsisXMLHandler.cpp:78
IString.h
IsisXMLChTrans.h
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
IsisXMLHandler::startElement
void startElement(const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname, const XERCES::Attributes &attributes)
Definition: IsisXMLHandler.cpp:151
IsisXMLHandler::characters
void characters(const XMLCh *const chars, const XMLSize_t length)
Definition: IsisXMLHandler.cpp:104
Isis::IException
Isis exception class.
Definition: IException.h:91
IsisXMLHandler
This is free and unencumbered software released into the public domain.
Definition: IsisXMLHandler.h:18
IException.h
Isis::IException::Programmer
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:146
std
Namespace for the standard library.
IsisXMLHandler::startDocument
void startDocument()
Definition: IsisXMLHandler.cpp:147
IsisXMLHandler::prevErrorHandler
ErrorHandler * prevErrorHandler
Definition: IsisXMLHandler.h:24
IsisXMLHandler::IsisXMLHandler
IsisXMLHandler()
Definition: IsisXMLHandler.cpp:29
IsisXMLHandler::endElement
void endElement(const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname)
Definition: IsisXMLHandler.cpp:120
IsisXMLHandler::processingInstruction
void processingInstruction(const XMLCh *const target, const XMLCh *const data)
Definition: IsisXMLHandler.cpp:142