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

xmlsimplebackendlibxml.h

00001 /* libIXAml - IXA Taldea */
00002 
00003 #ifndef _XMLSIMPLEBACKENDLIBXML_H
00004 #define _XMLSIMPLEBACKENDLIBXML_H
00005 
00006 #include "xmlsimplestruct.h"
00007 #include <string>
00008 #include <map>
00009 #include <libxml/parser.h>
00010 #include <libxml/tree.h>
00011 
00014 class XMLSimpleBackendLibxml:public XMLSimpleStruct {
00015   
00016   static std::map<EncodingType,const char*> enc2enc;       // EncodingType -> libxml formatura
00017   static std::map<EncodingType,const char*> enc2encInit();
00018   
00019  public:
00020 
00024   void readFile( const std::string & fname) throw (char*);
00025   
00029   void readFile(std::istream & fitx) throw (char*);
00030 
00034   void readString(const std::string & inputstr) throw (char*);
00035   
00039   void writeFile(const std::string & fname) const throw (char*);
00040 
00044   void writeFile(std::ostream & fitx) const throw (char*);
00045   
00049   void writeCompressedFile(const std::string & fname) const throw (char*);
00050 
00054   std::string writeString() const throw (char*);
00055 
00056  private:
00057   
00058   void readDocument(xmlDoc*) throw (char*);
00059   void writeDocument(xmlDoc*) const throw (char*);
00060   bool validateDocument(xmlDoc *) const throw (char*);
00061   XMLSimpleNode* getXMLSimpleNode(xmlDoc*, xmlNode*, XMLSimpleNode*) throw (char*);
00062   void insertLibxmlNode(xmlNode*, XMLSimpleNode *) const throw (char*);
00063   void writeProlog(xmlDoc*) const throw (char*);
00064   void readDtdFromDocument(xmlDoc*) throw (char*);
00065   void readEntitiesFromDocument(xmlDoc*) throw (char*);
00066 
00067 };
00068 
00069 
00070 #endif // _XMLSIMPLEBACKENDLIBXML_H

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