fixed the topmost () bug, added getTextCollection function
authordarroyue <darroyue@3cdefd35-fc62-479d-8e8d-bae585ffb9ca>
Thu, 11 Dec 2008 03:58:08 +0000 (03:58 +0000)
committerdarroyue <darroyue@3cdefd35-fc62-479d-8e8d-bae585ffb9ca>
Thu, 11 Dec 2008 03:58:08 +0000 (03:58 +0000)
git-svn-id: svn+ssh://idea.nguyen.vg/svn/sxsi/trunk/XMLTree@23 3cdefd35-fc62-479d-8e8d-bae585ffb9ca

XMLTree.cpp
XMLTree.h

index b5e53a7..7d0c5e3 100644 (file)
@@ -580,8 +580,6 @@ int XMLTree::OpenDocument(bool empty_texts, int sample_rate_text)
        fprintf(stderr, "Error: not enough memory\n");\r
        return NULLT;\r
     }\r
-    setbit(par_aux,npar,OP);  // marks a new opening parenthesis for the tree root\r
-    npar++;\r
     \r
     tags_aux = (TagType *) malloc(sizeof(TagType));\r
     if (!tags_aux) {\r
@@ -621,8 +619,6 @@ int XMLTree::CloseDocument()
        fprintf(stderr, "Error: not enough memory\n");\r
        return NULLT;    \r
     }\r
-    setbit(par_aux,npar,CP); \r
-    npar++;\r
     \r
     // creates the data structure for the tree topology\r
     Par = (bp *)malloc(sizeof(bp));      \r
index ba01941..f605286 100644 (file)
--- a/XMLTree.h
+++ b/XMLTree.h
@@ -336,6 +336,9 @@ public:
       return Text->GetText(d);\r
    }\r
    \r
+   TextCollection *getTextCollection() {\r
+      return Text;\r
+   }\r
    /** Save: saves XML tree data structure to file. */\r
    void Save(unsigned char *filename);\r
       \r