Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

XMLWriter.hpp

Go to the documentation of this file.
00001 /*==========================================================================
00002  * Copyright (c) 2004 University of Massachusetts.  All Rights Reserved.
00003  *
00004  * Use of the Lemur Toolkit for Language Modeling and Information Retrieval
00005  * is subject to the terms of the software license set forth in the LICENSE
00006  * file included with this software, and also available at
00007  * http://www.lemurproject.org/license.html
00008  *
00009  *==========================================================================
00010 */
00011 
00012 
00013 //
00014 // XMLWriter.h
00015 //
00016 // 8 October 2003 - tds
00017 //
00018 
00019 #ifndef MONITOR_XMLWRITER_H
00020 #define MONITOR_XMLWRITER_H
00021 
00022 #include "indri/XMLNode.hpp"
00023 #include <string>
00024 #include <map>
00025 
00026 class XMLWriter {
00027 private:
00028   XMLNode* _node;
00029 
00030   void _writeChar( char ch, std::string& output ) const;
00031   void _writeTabs( int tabs, std::string& output ) const;
00032   void _writeTag( const std::string& tag,
00033     const std::map<std::string,std::string>& attributes,
00034     std::string& output,
00035     bool opening ) const;
00036   void _writeEndOfLine( std::string& output ) const;
00037   void _writeXML( int tabs, const XMLNode* node, std::string& output ) const;
00038 
00039 public:
00040   XMLWriter( XMLNode* node ); 
00041   void write( std::string& output );
00042 };
00043 
00044 #endif // MONITOR_XMLWRITER_H
00045 

Generated on Wed Nov 3 12:59:08 2004 for Lemur Toolkit by doxygen1.2.18