nxmlabstractparser.h

Go to the documentation of this file.
00001 // LICENSE: (Please see the file COPYING for details)
00002 //
00003 // NUS - Nemesis Utilities System: A C++ application development framework 
00004 // Copyright (C) 2006, 2008 Otavio Rodolfo Piske
00005 //
00006 //  This file is part of NUS
00007 //
00008 //  This library is free software; you can redistribute it and/or
00009 //  modify it under the terms of the GNU Lesser General Public
00010 //  License as published by the Free Software Foundation version 2.1
00011 //  of the License.
00012 //
00013 //  This library is distributed in the hope that it will be useful,
00014 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016 //  Lesser General Public License for more details.
00017 //
00018 //  You should have received a copy of the GNU Lesser General Public
00019 //  License along with this library; if not, write to the Free Software
00020 //  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00021 //
00022 #ifndef NXMLABSTRACTPARSER_H
00023 #define NXMLABSTRACTPARSER_H
00024 
00025 #include <libxml/parser.h>
00026 
00031 #include "ndefs.h"
00032 #include "nstring.h"
00033 #include "nfile.h"
00034 
00042 class DllDeclSpec NXmlAbstractParser: public NObject { 
00043       public:
00047             enum XmlSchema {
00048                   XMLNOPARSING,     
00049                   XMLSCHEMA,        
00050                   XMLDTD            
00051             };
00052             
00056             NXmlAbstractParser(void);
00057             
00061             virtual ~NXmlAbstractParser(void);
00062             
00063             
00070             void setEncoding(const NString &encoding);
00071             
00076             NString getEncoding(void) const;
00077             
00082             virtual void setDefinitionUrl(const NString &url);
00083             
00088             NString getDefinitionUrl(void) const;
00089             
00095             virtual xmlDocPtr parse(const NString &filename) = 0;
00096             
00104             virtual xmlDocPtr parse(const NString &buffer, 
00105                               const NString &url) = 0;
00106             
00114             virtual xmlDocPtr parse(const NFile *file, 
00115                               const NString &url) = 0;
00116             
00117       protected:
00118             NString m_encoding;     
00119             NString m_url;          
00120 };
00121 
00122 #endif // NXMLABSTRACTPARSER_H

Generated on Wed Mar 5 23:10:36 2008 for NemesisUtilitiesSystem by  doxygen 1.5.4