Index: /issm/trunk/src/c/objects/KML/KML_Container.cpp
===================================================================
--- /issm/trunk/src/c/objects/KML/KML_Container.cpp	(revision 8214)
+++ /issm/trunk/src/c/objects/KML/KML_Container.cpp	(revision 8215)
@@ -23,5 +23,5 @@
 KML_Container::KML_Container(){
 
-	;
+	feature   =new DataSet;
 
 }
@@ -30,5 +30,8 @@
 KML_Container::~KML_Container(){
 
-	;
+	if (feature) {
+		delete feature;
+		feature   =NULL;
+	}
 
 }
@@ -39,5 +42,9 @@
 void  KML_Container::Echo(){
 
+	bool  flag=true;
+
 	KML_Feature::Echo();
+
+	_printf_(flag,"       feature: (size=%d)\n" ,feature->Size());
 
 	return;
@@ -59,5 +66,23 @@
 void  KML_Container::DeepEcho(char* indent){
 
+	int   i;
+	char  indent2[81];
+	bool  flag=true;
+
 	KML_Feature::DeepEcho(indent);
+
+/*  loop over the features for the container  */
+
+	strcpy(indent2,indent);
+	strcat(indent2,"  ");
+
+	if (feature->Size())
+		for (i=0; i<feature->Size(); i++) {
+			_printf_(flag,"%s       feature: [%d] begin\n" ,indent,i);
+			((KML_Feature *)feature->GetObjectByOffset(i))->DeepEcho(indent2);
+			_printf_(flag,"%s       feature: [%d] end\n"   ,indent,i);
+		}
+	else
+		_printf_(flag,"%s       feature: [empty]\n"    ,indent);
 
 	return;
@@ -68,5 +93,16 @@
 void  KML_Container::Write(FILE* filout,char* indent){
 
+	int   i;
+	char  indent2[81];
+
 	KML_Feature::Write(filout,indent);
+
+/*  loop over the features for the container  */
+
+	strcpy(indent2,indent);
+	strcat(indent2,"  ");
+
+	for (i=0; i<feature->Size(); i++)
+		((KML_Feature *)feature->GetObjectByOffset(i))->Write(filout,indent2);
 
 	return;
@@ -77,5 +113,37 @@
 void  KML_Container::Read(FILE* fid,char* kstr){
 
-	KML_Feature::Read(fid,kstr);
+	KML_Object*  kobj;
+
+/*  process field within opening and closing tags  */
+
+	if      (!strncmp(kstr,"</Container",11)) {
+		xfree((void**)&kstr);
+		return;
+	}
+	else if (!strncmp(kstr,"</",2))
+		_error_("KML_Container::Read -- Unexpected closing tag %s.\n",kstr);
+	else if (strncmp(kstr,"<",1))
+		_error_("KML_Container::Read -- Unexpected field \"%s\".\n",kstr);
+
+	else if (!strncmp(kstr,"<Placemark",10)) {
+		kobj=(KML_Object*)new KML_Placemark();
+		kobj->Read(fid,kstr);
+		feature   ->AddObject((Object*)kobj);
+	}
+
+	else if (!strncmp(kstr,"<Folder",7)) {
+		kobj=(KML_Object*)new KML_Folder();
+		kobj->Read(fid,kstr);
+		feature   ->AddObject((Object*)kobj);
+	}
+
+	else if (!strncmp(kstr,"<Document",9)) {
+		kobj=(KML_Object*)new KML_Document();
+		kobj->Read(fid,kstr);
+		feature   ->AddObject((Object*)kobj);
+	}
+
+	else if (!strncmp(kstr,"<",1))
+		KML_Feature::Read(fid,kstr);
 
 	return;
Index: /issm/trunk/src/c/objects/KML/KML_Container.h
===================================================================
--- /issm/trunk/src/c/objects/KML/KML_Container.h	(revision 8214)
+++ /issm/trunk/src/c/objects/KML/KML_Container.h	(revision 8215)
@@ -18,4 +18,6 @@
 
 	public:
+
+		DataSet* feature;
 
 		/*KML_Container constructors, destructors {{{1*/
Index: /issm/trunk/src/c/objects/KML/KML_Document.cpp
===================================================================
--- /issm/trunk/src/c/objects/KML/KML_Document.cpp	(revision 8214)
+++ /issm/trunk/src/c/objects/KML/KML_Document.cpp	(revision 8215)
@@ -23,5 +23,5 @@
 KML_Document::KML_Document(){
 
-	feature   =new DataSet;
+	;
 
 }
@@ -30,8 +30,5 @@
 KML_Document::~KML_Document(){
 
-	if (feature) {
-		delete feature;
-		feature   =NULL;
-	}
+	;
 
 }
@@ -46,6 +43,4 @@
 	_printf_(flag,"KML_Document:\n");
 	KML_Container::Echo();
-
-	_printf_(flag,"       feature: (size=%d)\n" ,feature->Size());
 
 	return;
@@ -67,24 +62,8 @@
 void  KML_Document::DeepEcho(char* indent){
 
-	int   i;
-	char  indent2[81];
 	bool  flag=true;
 
 	_printf_(flag,"%sKML_Document:\n",indent);
 	KML_Container::DeepEcho(indent);
-
-/*  loop over the features for the document  */
-
-	strcpy(indent2,indent);
-	strcat(indent2,"  ");
-
-	if (feature->Size())
-		for (i=0; i<feature->Size(); i++) {
-			_printf_(flag,"%s       feature: [%d] begin\n" ,indent,i);
-			((KML_Feature *)feature->GetObjectByOffset(i))->DeepEcho(indent2);
-			_printf_(flag,"%s       feature: [%d] end\n"   ,indent,i);
-		}
-	else
-		_printf_(flag,"%s       feature: [empty]\n"    ,indent);
 
 	return;
@@ -95,7 +74,4 @@
 void  KML_Document::Write(FILE* filout,char* indent){
 
-	int   i;
-	char  indent2[81];
-
 	if (this->id && strlen(this->id))
 		fprintf(filout,"%s<Document id=\"%s\">\n",indent,this->id);
@@ -104,12 +80,4 @@
 
 	KML_Container::Write(filout,indent);
-
-/*  loop over the features for the document  */
-
-	strcpy(indent2,indent);
-	strcat(indent2,"  ");
-
-	for (i=0; i<feature->Size(); i++)
-		((KML_Feature *)feature->GetObjectByOffset(i))->Write(filout,indent2);
 
 	fprintf(filout,"%s</Document>\n",indent);
@@ -123,5 +91,4 @@
 
 	char*        kstri;
-	KML_Object*  kobj;
 
 /*  check for id attribute  */
@@ -143,22 +110,4 @@
 		else if (strncmp(kstri,"<",1))
 			_error_("KML_Document::Read -- Unexpected field \"%s\".\n",kstri);
-
-		else if (!strncmp(kstri,"<Placemark",10)) {
-			kobj=(KML_Object*)new KML_Placemark();
-			kobj->Read(fid,kstri);
-			feature   ->AddObject((Object*)kobj);
-		}
-
-		else if (!strncmp(kstri,"<Folder",7)) {
-			kobj=(KML_Object*)new KML_Folder();
-			kobj->Read(fid,kstri);
-			feature   ->AddObject((Object*)kobj);
-		}
-
-		else if (!strncmp(kstri,"<Document",9)) {
-			kobj=(KML_Object*)new KML_Document();
-			kobj->Read(fid,kstri);
-			feature   ->AddObject((Object*)kobj);
-		}
 
 		else if (!strncmp(kstri,"<",1))
Index: /issm/trunk/src/c/objects/KML/KML_Document.h
===================================================================
--- /issm/trunk/src/c/objects/KML/KML_Document.h	(revision 8214)
+++ /issm/trunk/src/c/objects/KML/KML_Document.h	(revision 8215)
@@ -20,6 +20,4 @@
 
 	public:
-
-		DataSet* feature;
 
 		/*KML_Document constructors, destructors {{{1*/
Index: /issm/trunk/src/c/objects/KML/KML_Folder.cpp
===================================================================
--- /issm/trunk/src/c/objects/KML/KML_Folder.cpp	(revision 8214)
+++ /issm/trunk/src/c/objects/KML/KML_Folder.cpp	(revision 8215)
@@ -23,5 +23,5 @@
 KML_Folder::KML_Folder(){
 
-	feature   =new DataSet;
+	;
 
 }
@@ -30,8 +30,5 @@
 KML_Folder::~KML_Folder(){
 
-	if (feature) {
-		delete feature;
-		feature   =NULL;
-	}
+	;
 
 }
@@ -46,6 +43,4 @@
 	_printf_(flag,"KML_Folder:\n");
 	KML_Container::Echo();
-
-	_printf_(flag,"       feature: (size=%d)\n" ,feature->Size());
 
 	return;
@@ -67,24 +62,8 @@
 void  KML_Folder::DeepEcho(char* indent){
 
-	int   i;
-	char  indent2[81];
 	bool  flag=true;
 
 	_printf_(flag,"%sKML_Folder:\n",indent);
 	KML_Container::DeepEcho(indent);
-
-/*  loop over the features for the folder  */
-
-	strcpy(indent2,indent);
-	strcat(indent2,"  ");
-
-	if (feature->Size())
-		for (i=0; i<feature->Size(); i++) {
-			_printf_(flag,"%s       feature: [%d] begin\n" ,indent,i);
-			((KML_Feature *)feature->GetObjectByOffset(i))->DeepEcho(indent2);
-			_printf_(flag,"%s       feature: [%d] end\n"   ,indent,i);
-		}
-	else
-		_printf_(flag,"%s       feature: [empty]\n"    ,indent);
 
 	return;
@@ -96,5 +75,4 @@
 
 	int   i;
-	char  indent2[81];
 
 	if (this->id && strlen(this->id))
@@ -105,12 +83,4 @@
 	KML_Container::Write(filout,indent);
 
-/*  loop over the features for the folder  */
-
-	strcpy(indent2,indent);
-	strcat(indent2,"  ");
-
-	for (i=0; i<feature->Size(); i++)
-		((KML_Feature *)feature->GetObjectByOffset(i))->Write(filout,indent2);
-
 	fprintf(filout,"%s</Folder>\n",indent);
 
@@ -120,5 +90,5 @@
 
 /*FUNCTION KML_Folder::Read {{{1*/
-void  KML_Folder::Read(FILE* filin,char* kstr){
+void  KML_Folder::Read(FILE* fid,char* kstr){
 
 
Index: /issm/trunk/src/c/objects/KML/KML_Folder.h
===================================================================
--- /issm/trunk/src/c/objects/KML/KML_Folder.h	(revision 8214)
+++ /issm/trunk/src/c/objects/KML/KML_Folder.h	(revision 8215)
@@ -20,6 +20,4 @@
 
 	public:
-
-		DataSet* feature;
 
 		/*KML_Folder constructors, destructors {{{1*/
