From: darroyue Date: Thu, 11 Dec 2008 03:58:08 +0000 (+0000) Subject: fixed the topmost () bug, added getTextCollection function X-Git-Url: http://git.nguyen.vg/gitweb/?a=commitdiff_plain;h=efe894650813a19a0e1408eb5807e59f037afc3b;hp=1c3300373a43062be9bb8d23faf3c8446f9aa6c5;p=SXSI%2FXMLTree.git fixed the topmost () bug, added getTextCollection function git-svn-id: svn+ssh://idea.nguyen.vg/svn/sxsi/trunk/XMLTree@23 3cdefd35-fc62-479d-8e8d-bae585ffb9ca --- diff --git a/XMLTree.cpp b/XMLTree.cpp index b5e53a7..7d0c5e3 100644 --- a/XMLTree.cpp +++ b/XMLTree.cpp @@ -580,8 +580,6 @@ int XMLTree::OpenDocument(bool empty_texts, int sample_rate_text) fprintf(stderr, "Error: not enough memory\n"); return NULLT; } - setbit(par_aux,npar,OP); // marks a new opening parenthesis for the tree root - npar++; tags_aux = (TagType *) malloc(sizeof(TagType)); if (!tags_aux) { @@ -621,8 +619,6 @@ int XMLTree::CloseDocument() fprintf(stderr, "Error: not enough memory\n"); return NULLT; } - setbit(par_aux,npar,CP); - npar++; // creates the data structure for the tree topology Par = (bp *)malloc(sizeof(bp)); diff --git a/XMLTree.h b/XMLTree.h index ba01941..f605286 100644 --- a/XMLTree.h +++ b/XMLTree.h @@ -336,6 +336,9 @@ public: return Text->GetText(d); } + TextCollection *getTextCollection() { + return Text; + } /** Save: saves XML tree data structure to file. */ void Save(unsigned char *filename);