SAXParser.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00009 
00010 #ifndef ZYPP_SAXParser_H
00011 #define ZYPP_SAXParser_H
00012 
00013 #include <iosfwd>
00014 #include <string>
00015 #include <vector>
00016 #include <libxml/parser.h>
00017 
00018 #include <boost/function.hpp>
00019 
00020 #include "zypp/Pathname.h"
00021 
00022 
00024 namespace zypp
00025 { 
00026 namespace parser
00027 { 
00028 
00029   class SAXParser
00030   {
00031     public:
00032 
00033     SAXParser();
00034     virtual ~SAXParser();
00035 
00036     void parseFile( const Pathname &p);
00037 
00038     virtual void startElement(const std::string name, const xmlChar **atts);
00039     virtual void endElement(const std::string name);
00040     virtual void characters(const xmlChar *ch, int len);
00041   
00042     static void startElement_receiver(void *ctx, const xmlChar *name, const xmlChar **atts);
00043     static void endElement_receiver(void *ctx, const xmlChar *name);
00044     static void characters_receiver (void *data, const xmlChar *ch, int len);
00045     private:
00046     xmlSAXHandler _saxHandler;
00047    
00048   };
00049 
00050 } // namespace parser
00051 } // namespace zypp
00053 #endif // ZYPP_SOURCE_SAXParser_H

Generated on Tue Nov 28 16:49:30 2006 for zypp by  doxygen 1.5.0