1 /**************************************
4 * Header file for the shredder routine that invokes the XML parser and
5 * calls the appropriate construction methods of the storage interface in
6 * correspondence with received parsing events.
8 * Author: Greg Leighton
12 #ifndef XMLDOCSHREDDER_H_
13 #define XMLDOCSHREDDER_H_
15 #include <libxml++/libxml++.h>
16 #include <libxml++/parsers/textreader.h>
18 #include "StorageInterface.h"
21 using namespace xmlpp;
27 XMLDocShredder(const string inFileName,int sf, bool iet, bool dtc);
28 XMLDocShredder(const unsigned char * data, TextReader::size_type size,int sf, bool iet, bool dtc);
29 virtual ~XMLDocShredder();
30 virtual void processStartElement();
31 virtual void processEndElement();
32 virtual void processPCDATA();
33 virtual void processAttributes();
34 virtual void processSignificantWhitespace();
35 virtual void processStartDocument(const string docName);
36 virtual void processEndDocument();
37 virtual void processComment();
38 virtual void processProcessingInstruction();
39 virtual void processDocTypeDeclaration();
40 virtual void processUnknownNodeType();
41 virtual void processCDATASection();
44 StorageInterface *storageIfc_;
52 // used to coalece successive text events
53 // which can occur if we discard pi and comment nodes.
56 #endif /*XMLDOCSHREDDER_H_*/