XmlDocument.hGo to the documentation of this file.00001 00006 /* 00007 Copyright (C) 2008-2011 Anders Hedstrom 00008 00009 This library is made available under the terms of the GNU GPL, with 00010 the additional exemption that compiling, linking, and/or using OpenSSL 00011 is allowed. 00012 00013 If you would like to use this library in a closed-source application, 00014 a separate license agreement is available. For information about 00015 the closed-source license agreement for the C++ sockets library, 00016 please visit http://www.alhem.net/Sockets/license.html and/or 00017 email license@alhem.net. 00018 00019 This program is free software; you can redistribute it and/or 00020 modify it under the terms of the GNU General Public License 00021 as published by the Free Software Foundation; either version 2 00022 of the License, or (at your option) any later version. 00023 00024 This program is distributed in the hope that it will be useful, 00025 but WITHOUT ANY WARRANTY; without even the implied warranty of 00026 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00027 GNU General Public License for more details. 00028 00029 You should have received a copy of the GNU General Public License 00030 along with this program; if not, write to the Free Software 00031 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00032 */ 00033 #ifndef _XmlDocument_H 00034 #define _XmlDocument_H 00035 00036 #include "sockets-config.h" 00037 00038 #ifdef ENABLE_XML 00039 00040 #include <string> 00041 #include <libxml/xmlmemory.h> 00042 #include <libxml/parser.h> 00043 00044 #ifdef SOCKETS_NAMESPACE 00045 namespace SOCKETS_NAMESPACE { 00046 #endif 00047 namespace Xml { 00048 00049 00050 class XmlDocument 00051 { 00052 public: 00053 XmlDocument(const std::string& filename,const std::string& verify_ns = "",const std::string& verify_root = ""); 00054 virtual ~XmlDocument(); 00055 00057 bool IsOk() { return m_ok; } 00058 00059 operator xmlDocPtr(); 00060 00061 protected: 00062 XmlDocument(const XmlDocument& ) {} // copy constructor 00063 00064 private: 00065 XmlDocument& operator=(const XmlDocument& ) { return *this; } // assignment operator 00066 00067 xmlDocPtr m_doc; 00068 bool m_ok; 00069 }; 00070 00071 00072 } 00073 #ifdef SOCKETS_NAMESPACE 00074 } 00075 #endif 00076 00077 #endif // ENABLE_XML 00078 00079 #endif // _XmlDocument_H |
1.4.4
