00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef XMLGENERATOR_H
00019 #define XMLGENERATOR_H
00020
00021 #include <string>
00022 #include <sstream>
00023 #include <iostream>
00024
00025 #include "codegenerator.h"
00026 #include "version.h"
00027
00028 namespace highlight {
00029
00040 class XmlGenerator : public highlight::CodeGenerator
00041 {
00042 public:
00043
00044 XmlGenerator();
00045
00046 ~XmlGenerator();
00047
00051 string getHeader(const string & title);
00052
00054 string getFooter();
00055
00057 void printBody();
00058
00059 private:
00060
00061 string styleDefinitionCache;
00062
00063 string getStyleDefinition();
00064
00065 string formatStyleAttributes(const string &, const ElementStyle &);
00066
00068 virtual string maskCharacter(unsigned char );
00069
00070
00071
00072
00073 string getOpenTag(const string& );
00074 string getCloseTag(const string& );
00075
00076 string getMatchingOpenTag(unsigned int styleID);
00077 string getMatchingCloseTag(unsigned int styleID);
00078 };
00079
00080 }
00081
00082 #endif