18 XMLWriter::XMLWriter(ostream* out, 
string indentString, 
string aDefaultNameSpace)
    41     *
writer << 
"<?xml version=\"" << version.c_str() << 
"\" ";
    42     if (encoding.compare(
"") != 0) {
    44         *
writer << 
"encoding=\"" << encoding.c_str() << 
"\" ";
    47         *
writer << 
"standalone=\"yes\" ";
    56         cerr << 
"XMLWriter::ReferToDTD cannot be called twice" << endl;
    59     *
writer << 
"<!DOCTYPE " << name.c_str() << 
" PUBLIC \"" << pid.c_str() << 
"\" \"" << ref.c_str() << 
"\">" << endl;
    64         cerr << 
"XMLWriter::ReferToDTD cannot be called twice";
    67     *
writer << 
"<!DOCTYPE " << name.c_str() << 
" SYSTEM \"" << system.c_str() << 
"\">" << endl;
    73             if (!force) cerr << 
"Not all tags were closed before closing XML document:" << endl;
    78                     cerr << 
"   </" << 
openTags.top().c_str() << 
">" << endl;
    88     if (comment.find(
"--") != string::npos) {
    89         cerr << 
"XMLWriter::printComment '--' sequence not allowed in comment" << endl;
   110         cerr << 
"XMLWriter::openTag(), First tag: '" << name << 
"' not equal to DTD id: '" << 
dtdName << 
"'" << endl;
   112     *
writer << 
"<" << name.c_str();
   122         cerr << 
"XMLWriter::closeTag(), No open tags" << endl;
   127     *
writer << 
"</" << name.c_str() << 
">" << endl;
   132     *
writer << 
"<" << name.c_str();
   147     if (name == 
"value") 
setAttribute(
"type", (std::string)
"Color");
   152     if (name == 
"value") 
setAttribute(
"type", (std::string)
"long");
   157     if (name == 
"showlabel") {
   161         if (name == 
"value") 
setAttribute(
"type", (std::string)
"int");
   167     if (name == 
"value") 
setAttribute(
"type", (std::string)
"boolean");
   172     if (name == 
"value") 
setAttribute(
"type", (std::string)
"double");
   177     int width = tagLength + 1;
   178     bool extraIndent = 
false;
   180         string key = i->first;
   183         int length = key.length() + value.length() + 3;
   195         *
writer << key.c_str() << 
"=\"" << value.c_str() << 
"\"";
   205     int len = s.length();
   206     for (
int i = 0; i < len; i++) {
   222                 str.append(
""");
   227                 sprintf(buffer, 
"&#%ud", ch);
   250     int len = s.length();
   251     for (
int i = 0; i < len; i++) {
 std::string normalizeText(std::string s)
 
std::map< std::string, std::string > attributes
 
std::stack< std::string > openTags
 
void println(std::string text)
 
void printTag(std::string name)
 
void printComment(std::string comment)
 
void closeDoc(bool force=false)
 
void printAttributes(int tagLength)
 
void referToDTD(std::string name, std::string pid, std::string ref)
 
void openTag(std::string name)
 
void print(std::string text)
 
void setIndentString(const std::string &indentString)
 
IndentPrintWriter * writer
 
std::string normalize(std::string s)
 
void setAttribute(std::string name, char *value)
 
void openDoc(std::string version="1.0", std::string encoding="", bool standalone=false)
 
std::string getIndentString() const
 
system("rm -rf microbeam.root")
 
void printPlain(std::string text)
 
std::string toShowLabel()
 
void checkNameValid(std::string s)
 
std::string getAsString()