From efe894650813a19a0e1408eb5807e59f037afc3b Mon Sep 17 00:00:00 2001 From: darroyue Date: Thu, 11 Dec 2008 03:58:08 +0000 Subject: [PATCH 1/1] 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 --- XMLTree.cpp | 4 ---- XMLTree.h | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) 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); -- 2.17.1