File failed to load: https://isis.astrogeology.usgs.gov/6.0.0/Object/assets/jax/output/NativeMML/config.js
Isis 3 Programmer Reference
IsisXMLIgnore.cpp
1 
6 /* SPDX-License-Identifier: CC0-1.0 */
7 #include <string>
8 
9 #include <xercesc/util/PlatformUtils.hpp>
10 #include <xercesc/sax2/SAX2XMLReader.hpp>
11 
12 #include "IsisXMLIgnore.h"
13 #include "IsisXMLChTrans.h"
14 
15 using namespace std;
16 
17 namespace XERCES = XERCES_CPP_NAMESPACE;
18 
19 // Constructors
20 
21 IsisXMLIgnore::IsisXMLIgnore(char *PencodingName,
22  bool &PexpandNamespaces,
23  XERCES::SAX2XMLReader* &Pparser,
24  const std::string Pignore) {
25 
26  encodingName = PencodingName;
27  expandNamespaces = PexpandNamespaces;
28  parser = Pparser;
29  ignore = Pignore;
30 
31  prevDocHandler = parser->getContentHandler();
32  prevErrorHandler = parser->getErrorHandler();
33 
34  parser->setContentHandler(this);
35  parser->setErrorHandler(this);
36 
37 }
38 
39 
40 IsisXMLIgnore::~IsisXMLIgnore() {}
41 
42 
43 void IsisXMLIgnore::characters(const XMLCh *const chars,
44  const XMLSize_t length) {
45 }
46 
47 void IsisXMLIgnore::endElement(const XMLCh *const uri,
48  const XMLCh *const localname,
49  const XMLCh *const qname) {
50 
51  if((string)XERCES::XMLString::transcode(localname) == ignore) {
52  parser->setContentHandler(prevDocHandler);
53  parser->setErrorHandler(prevErrorHandler);
54  }
55 }
std
Namespace for the standard library.

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 07/13/2023 15:16:43