Safety commit before clean-up
[SXSI/xpathcomp.git] / XMLDocShredder.h
index 58d4053..ca555fa 100644 (file)
@@ -15,7 +15,8 @@
 #include <libxml++/libxml++.h>
 #include <libxml++/parsers/textreader.h>
 #include <string>
-#include "StorageInterface.h"
+#include "XMLTree.h"
+#include "XMLTreeBuilder.h"
 
 using namespace std;
 using namespace xmlpp;
@@ -23,6 +24,7 @@ using namespace xmlpp;
 
 class XMLDocShredder
 {
+  void doText();
 public:
   XMLDocShredder(const string inFileName,int sf, bool iet, bool dtc);
   XMLDocShredder(const unsigned char * data, TextReader::size_type size,int sf, bool iet, bool dtc);
@@ -41,16 +43,20 @@ public:
   virtual void processCDATASection();
   virtual void parse();
   
-       StorageInterface *storageIfc_;
+  XMLTree * getXMLTree(){
+    return tree;
+  }
 
        
-private:
-       TextReader *reader_;
-       void setProperties();
-       bool last_text;
-       string buffer; 
-       // used to coalece successive text events
-       // which can occur if we discard pi and comment nodes.
+ private:
+  XMLTreeBuilder * tb;
+  XMLTree * tree;
+  TextReader *reader_;
+  void setProperties();
+  bool last_text;
+  string buffer; 
+  // used to coalece successive text events
+  // which can occur if we discard pi and comment nodes.
 };
 
 #endif /*XMLDOCSHREDDER_H_*/