JEMRIS  2.8.1
open-source MRI simulations
XMLIO.h
Go to the documentation of this file.
1 
5 /*
6  * JEMRIS Copyright (C)
7  * 2006-2015 Tony Stoecker
8  * 2007-2015 Kaveh Vahedipour
9  * 2009-2015 Daniel Pflugfelder
10  *
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25  */
26 
27 #ifndef XMLIO_H_
28 #define XMLIO_H_
29 
30 #include <string.h>
31 #include <stdlib.h>
32 
33 #include <xercesc/dom/DOM.hpp>
34 #include <xercesc/parsers/XercesDOMParser.hpp>
35 #include <xercesc/util/OutOfMemoryException.hpp>
36 #include <xercesc/framework/LocalFileInputSource.hpp>
37 
38 XERCES_CPP_NAMESPACE_USE
39 
40 using namespace std;
41 
42 #include "DOMTreeErrorReporter.h"
43 
48 enum errorCodes {
49  OK,
57 };
58 
60 
61 class XMLIO {
62 
63  public:
64 
68  XMLIO();
69 
73  virtual ~XMLIO();
74 
81  DOMDocument*
82  Parse (string uri);
83 
92  DOMNode*
93  RunTree (DOMNode* node, void* ptr, unsigned int (*fun) (void*, DOMNode*) );
94 
103  bool
104  Write (DOMImplementation* impl, DOMNode* node, string filename) ;
105 
106  private:
107 
108  XercesDOMParser::ValSchemes valScheme;
109  bool doNamespaces;
110  bool doSchema;
111  bool schemaFullChecking;
112  bool doCreate;
113 
114  XercesDOMParser* m_parser;
115  DOMTreeErrorReporter* m_err_reporter;
116 };
117 
118 #endif /*XMLIO_H_*/
XML file-IO class.
Definition: XMLIO.h:61
Definition: XMLIO.h:54
Definition: XMLIO.h:55
Definition: XMLIO.h:56
Definition: XMLIO.h:49
Definition: XMLIO.h:52
Definition: XMLIO.h:50
Definition: XMLIO.h:53
Definition: XMLIO.h:51
errorCodes
Return codes.
Definition: XMLIO.h:48
Implementation of JEMRIS DOMTreeErrorReporter.

-- last change 17.06.2016 | Tony Stoecker | Imprint --