Main Page | Class Hierarchy | Class List | File List | Class Members

xmlsimplebackendlibxmlpp.h

00001 /* libIXAml - IXA Taldea */
00002 
00003 #ifndef _XMLSIMPLEBACKENDLIBXMLPP_H
00004 #define _XMLSIMPLEBACKENDLIBXMLPP_H
00005 
00006 #ifdef HAVE_CONFIG_H
00007 #include <config.h>
00008 #endif
00009 #include <libxml++/libxml++.h>
00010 #include "xmlsimplestruct.h"
00011 #include <string>
00012 #include <map>
00013 
00016 class XMLSimpleBackendLibxmlpp:public XMLSimpleStruct {
00017   
00018   static std::map<EncodingType,std::string> enc2enc;            // EncodingType -> libxml++ formatura
00019   static std::map<EncodingType,std::string> enc2encInit();
00020   
00021  public:
00022 
00023   // OHARRA string, file eta etorkizunean gehitu daitezken metodoak nolabait bildu behar dira kodea ez errepikatzeko.
00024   // orain presaka gabiltza ;-)
00025 
00026   
00030   void readFile( const std::string & fname) throw (char*);
00031   
00035   void readFile(std::istream & fitx) throw (char*);
00036 
00040   void readString(const std::string & inputstr) throw (char*);
00041 
00045   void writeFile(const std::string & fname) const throw (char*);
00046 
00050   void writeFile(std::ostream & fitx) const throw (char*);
00051   
00055   void writeCompressedFile(const std::string & fname) const throw (char*);
00056   
00060   std::string writeString() const throw (char*);
00061   
00062  private:
00063   
00064   void readDocument(xmlpp::DomParser &) throw (char*);
00065   void writeDocument(xmlpp::Document *) const throw (char*);
00066   void validateDocument(xmlpp::Document *) const throw (char*);
00067   XMLSimpleNode* getXMLSimpleNode(const xmlpp::Node*, XMLSimpleNode*) throw (char*);
00068   void insertLibxmlppNode(xmlpp::Node*, XMLSimpleNode *) const throw (char*);
00069   void writeProlog(xmlpp::Document*) const throw (char*);
00070   void readDtdFromDocument(xmlpp::Document*) throw (char*);
00071   void readEntitiesFromDocument(xmlpp::Document *) throw (char*); // entitateak irakurtzeko zuzenean libxml erabili
00072 
00073 };
00074 
00075 
00076 #endif // _XMLSIMPLEBACKENDLIBXMLPP_H

Generated on Tue Sep 11 12:07:45 2007 for libIXAml by doxygen 1.3.5