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>
19 #include "XMLTreeBuilder.h"
22 using namespace xmlpp;
29 XMLDocShredder(const string inFileName,int sf, bool iet, bool dtc);
30 XMLDocShredder(const unsigned char * data, TextReader::size_type size,int sf, bool iet, bool dtc);
31 virtual ~XMLDocShredder();
32 virtual void processStartElement();
33 virtual void processEndElement();
34 virtual void processPCDATA();
35 virtual void processAttributes();
36 virtual void processSignificantWhitespace();
37 virtual void processStartDocument(const string docName);
38 virtual void processEndDocument();
39 virtual void processComment();
40 virtual void processProcessingInstruction();
41 virtual void processDocTypeDeclaration();
42 virtual void processUnknownNodeType();
43 virtual void processCDATASection();
46 XMLTree * getXMLTree(){
58 // used to coalece successive text events
59 // which can occur if we discard pi and comment nodes.
62 #endif /*XMLDOCSHREDDER_H_*/