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

DbXMLSaxHandler.hpp

Go to the documentation of this file.
00001 #ifndef DBXMLSAXHANDLER_H
00002 #define DBXMLSAXHANDLER_H
00003 
00004 #include "Folder.hpp"
00005 #include "Bookmark.hpp"
00006 
00007 #include <stack>
00008 #include <sax2/DefaultHandler.hpp>
00009 #include <sax2/Attributes.hpp>
00010 
00014 class DbXMLSaxHandler : public DefaultHandler {
00015  public:
00019         DbXMLSaxHandler();
00020 
00025         void startElement(
00026                 const    XMLCh* const           uri,
00027                 const    XMLCh* const           localname,
00028                 const    XMLCh* const           qname,
00029                 const    Attributes&             attrs
00030                 );
00031 
00035         void endElement(
00036                 const    XMLCh* const           uri,
00037                 const    XMLCh* const           localname,
00038                 const    XMLCh* const           qname
00039                 );
00040 
00045         void characters(
00046                 const XMLCh* const chars,
00047                 const unsigned int length);
00048 
00052         void resetDocument();
00053 
00059         Folder* getRoot();
00060 
00061  private:
00067         void set_attribute(Node* node, const string& name, const string& value);
00073         void set_attribute(Bookmark* node, const string& name, const string& value);
00074 
00078         Folder* _root;
00079 
00084         Folder* _curr_folder;
00085 
00091         stack<Folder*> _folders;
00092 
00097         Node* _curr_item;
00098 
00104         string _current_attr_name;
00105 };
00106 
00107 #endif

Generated on Sun Jan 20 20:59:59 2002 for bkmd by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001