Index: /issm/trunk/src/c/objects/KML/KMLFileReadUtils.cpp
===================================================================
--- /issm/trunk/src/c/objects/KML/KMLFileReadUtils.cpp	(revision 10628)
+++ /issm/trunk/src/c/objects/KML/KMLFileReadUtils.cpp	(revision 10629)
@@ -40,5 +40,4 @@
 	while ((c=getc(fid)) != EOF) {
 		/*  ignore leading blanks  */
-//		printf("point 0 c=%c\n",c);
 		if (inew && isspace(c))
 			continue;
@@ -49,13 +48,10 @@
 			/*  distinguish between tag or comment  */
 			if (c == '<') {
-//				printf("point 1 c=%c\n",c);
 				ungetc(c,fid);
 				if (!(bufferc=KMLFileTokenComment(fid))) {
 					c=getc(fid);
-//					printf("point 2 c=%c\n",c);
 					itag=1;
 				}
 				else {
-//					printf("point 3 buffer=%s\n",buffer);
 					xfree((void**)&bufferc);
 					inew=1;
@@ -117,9 +113,9 @@
 		}
 
-	if      (itag)
-		_printf_(true,"tag buffer (length=%d):\n",ibuf);
-	else if (ifield)
-		_printf_(true,"field buffer (length=%d):\n",ibuf);
-	_printf_(true,"%s\n",buffer);
+//	if      (itag)
+//		_printf_(true,"tag buffer (length=%d):\n",ibuf);
+//	else if (ifield)
+//		_printf_(true,"field buffer (length=%d):\n",ibuf);
+//	_printf_(true,"%s\n",buffer);
 
 	if (!ibuf)
@@ -147,5 +143,4 @@
 
 	while ((c=getc(fid)) != EOF) {
-//		printf("point 10 c=%c\n",c);
 		/*  ignore leading blanks  */
 		if (inew && isspace(c))
@@ -165,7 +160,5 @@
 				for (i=ibuf-1; i>=0; i--)
 					ungetc(buffer[i],fid);
-//				printf("point 11 buffer=%p\n",buffer);
 				xfree((void**)&buffer);
-//				printf("point 12 buffer=%p\n",buffer);
 				return(buffer);
 			}
@@ -188,6 +181,6 @@
 		}
 
-	_printf_(true,"comment buffer (length=%d):\n",ibuf);
-	_printf_(true,"%s\n",buffer);
+//	_printf_(true,"comment buffer (length=%d):\n",ibuf);
+//	_printf_(true,"%s\n",buffer);
 
 	if (!ibuf)
@@ -224,6 +217,6 @@
 
 /*FUNCTION  KMLFileTagAttrib {{{1*/
-void KMLFileTagAttrib(KML_Object* kobj,
-					  char* ktag){
+int KMLFileTagAttrib(KML_Object* kobj,
+					 char* ktag){
 
 /*  for the given tag buffer, read and store the attributes  */
@@ -233,4 +226,5 @@
 	char*   ktokv;
 	char    quote[]={'\"','\0'};
+	int     isolo=0;
 
 /*  strtok modifies ktag, so work on copy  */
@@ -241,7 +235,12 @@
 /*  loop through tag to find all attributes  */
 
+	/*  return first non blank and move past subsequent blank  */
 	ktokn=strtok(ktagi," ");
-	while (ktokn=strtok(NULL," =?>")) {
-
+//	_printf_(true,"KMLFileTagAttrib -- initial token=\"%s\".\n",ktokn);
+
+	/*  return next non " =?/>" and move past subsequent " =?/>"  */
+	while (ktokn=strtok(NULL," =?/>")) {
+
+		/*  return next non quote and move past subsequent quote  */
 		ktokv=strtok(NULL,quote);
 //		_printf_(true,"KMLFileTagAttrib -- attribute %s=\"%s\".\n",ktokn,ktokv);
@@ -255,5 +254,13 @@
 	xfree((void**)&ktagi);
 
-	return;
+/*  check for xml declaration, dtd declaration, or solo tag  */
+
+	if ((!strncmp(&ktag[0],"<?"       ,2) && !strncmp(&ktag[strlen(ktag)-2],"?>",2)) ||
+		(!strncmp(&ktag[0],"<!DOCTYPE",9) && !strncmp(&ktag[strlen(ktag)-1], ">",1)) ||
+		(!strncmp(&ktag[0],"<"        ,1) && !strncmp(&ktag[strlen(ktag)-2],"/>",2)))
+		isolo=1;
+//	_printf_(true,"KMLFileTagAttrib -- isolo=%d.\n",isolo);
+
+	return(isolo);
 }
 /*}}}*/
Index: /issm/trunk/src/c/objects/KML/KMLFileReadUtils.h
===================================================================
--- /issm/trunk/src/c/objects/KML/KMLFileReadUtils.h	(revision 10628)
+++ /issm/trunk/src/c/objects/KML/KMLFileReadUtils.h	(revision 10629)
@@ -20,6 +20,6 @@
 						int c,
 						int bufblk);
-void KMLFileTagAttrib(KML_Object* kobj,
-					  char* ktag);
+int KMLFileTagAttrib(KML_Object* kobj,
+					 char* ktag);
 int KMLFileTokenParse(int* pival,
 					  char* ktag,
Index: /issm/trunk/src/c/objects/KML/KML_Document.cpp
===================================================================
--- /issm/trunk/src/c/objects/KML/KML_Document.cpp	(revision 10628)
+++ /issm/trunk/src/c/objects/KML/KML_Document.cpp	(revision 10629)
@@ -92,8 +92,9 @@
 	char*        kstri;
 
-/*  get object attributes  */
+/*  get object attributes and check for solo tag  */
 
-	KMLFileTagAttrib(this,
-					 kstr);
+	if (KMLFileTagAttrib(this,
+						 kstr))
+		return;
 
 /*  loop over and process fields within opening and closing tags  */
Index: /issm/trunk/src/c/objects/KML/KML_File.cpp
===================================================================
--- /issm/trunk/src/c/objects/KML/KML_File.cpp	(revision 10628)
+++ /issm/trunk/src/c/objects/KML/KML_File.cpp	(revision 10629)
@@ -127,8 +127,9 @@
 	KML_Object*  kobj;
 
-/*  get object attributes  */
-
-	KMLFileTagAttrib(this,
-					 kstr);
+/*  get object attributes and check for solo tag  */
+
+	if (KMLFileTagAttrib(this,
+						 kstr))
+		return;
 
 /*  loop over and process fields within opening and closing tags  */
Index: /issm/trunk/src/c/objects/KML/KML_Folder.cpp
===================================================================
--- /issm/trunk/src/c/objects/KML/KML_Folder.cpp	(revision 10628)
+++ /issm/trunk/src/c/objects/KML/KML_Folder.cpp	(revision 10629)
@@ -92,8 +92,9 @@
 	char*        kstri;
 
-/*  get object attributes  */
+/*  get object attributes and check for solo tag  */
 
-	KMLFileTagAttrib(this,
-					 kstr);
+	if (KMLFileTagAttrib(this,
+						 kstr))
+		return;
 
 /*  loop over and process fields within opening and closing tags  */
Index: /issm/trunk/src/c/objects/KML/KML_GroundOverlay.cpp
===================================================================
--- /issm/trunk/src/c/objects/KML/KML_GroundOverlay.cpp	(revision 10628)
+++ /issm/trunk/src/c/objects/KML/KML_GroundOverlay.cpp	(revision 10629)
@@ -125,8 +125,9 @@
 	char*        kstri;
 
-/*  get object attributes  */
+/*  get object attributes and check for solo tag  */
 
-	KMLFileTagAttrib(this,
-					 kstr);
+	if (KMLFileTagAttrib(this,
+						 kstr))
+		return;
 
 /*  loop over and process fields within opening and closing tags  */
Index: /issm/trunk/src/c/objects/KML/KML_Icon.cpp
===================================================================
--- /issm/trunk/src/c/objects/KML/KML_Icon.cpp	(revision 10628)
+++ /issm/trunk/src/c/objects/KML/KML_Icon.cpp	(revision 10629)
@@ -131,8 +131,9 @@
 	char*        kstri;
 
-/*  get object attributes  */
+/*  get object attributes and check for solo tag  */
 
-	KMLFileTagAttrib(this,
-					 kstr);
+	if (KMLFileTagAttrib(this,
+						 kstr))
+		return;
 
 /*  loop over and process fields within opening and closing tags  */
Index: /issm/trunk/src/c/objects/KML/KML_LatLonBox.cpp
===================================================================
--- /issm/trunk/src/c/objects/KML/KML_LatLonBox.cpp	(revision 10628)
+++ /issm/trunk/src/c/objects/KML/KML_LatLonBox.cpp	(revision 10629)
@@ -114,8 +114,9 @@
 	char*        kstri;
 
-/*  get object attributes  */
+/*  get object attributes and check for solo tag  */
 
-	KMLFileTagAttrib(this,
-					 kstr);
+	if (KMLFileTagAttrib(this,
+						 kstr))
+		return;
 
 /*  loop over and process fields within opening and closing tags  */
Index: /issm/trunk/src/c/objects/KML/KML_LineString.cpp
===================================================================
--- /issm/trunk/src/c/objects/KML/KML_LineString.cpp	(revision 10628)
+++ /issm/trunk/src/c/objects/KML/KML_LineString.cpp	(revision 10629)
@@ -129,8 +129,9 @@
 	char*        kstri;
 
-/*  get object attributes  */
-
-	KMLFileTagAttrib(this,
-					 kstr);
+/*  get object attributes and check for solo tag  */
+
+	if (KMLFileTagAttrib(this,
+						 kstr))
+		return;
 
 /*  loop over and process fields within opening and closing tags  */
Index: /issm/trunk/src/c/objects/KML/KML_LineStyle.cpp
===================================================================
--- /issm/trunk/src/c/objects/KML/KML_LineStyle.cpp	(revision 10628)
+++ /issm/trunk/src/c/objects/KML/KML_LineStyle.cpp	(revision 10629)
@@ -99,8 +99,9 @@
 	char*        kstri;
 
-/*  get object attributes  */
+/*  get object attributes and check for solo tag  */
 
-	KMLFileTagAttrib(this,
-					 kstr);
+	if (KMLFileTagAttrib(this,
+						 kstr))
+		return;
 
 /*  loop over and process fields within opening and closing tags  */
Index: /issm/trunk/src/c/objects/KML/KML_LinearRing.cpp
===================================================================
--- /issm/trunk/src/c/objects/KML/KML_LinearRing.cpp	(revision 10628)
+++ /issm/trunk/src/c/objects/KML/KML_LinearRing.cpp	(revision 10629)
@@ -129,8 +129,9 @@
 	char*        kstri;
 
-/*  get object attributes  */
-
-	KMLFileTagAttrib(this,
-					 kstr);
+/*  get object attributes and check for solo tag  */
+
+	if (KMLFileTagAttrib(this,
+						 kstr))
+		return;
 
 /*  loop over and process fields within opening and closing tags  */
Index: /issm/trunk/src/c/objects/KML/KML_MultiGeometry.cpp
===================================================================
--- /issm/trunk/src/c/objects/KML/KML_MultiGeometry.cpp	(revision 10628)
+++ /issm/trunk/src/c/objects/KML/KML_MultiGeometry.cpp	(revision 10629)
@@ -127,8 +127,9 @@
 	KML_Object*  kobj;
 
-/*  get object attributes  */
-
-	KMLFileTagAttrib(this,
-					 kstr);
+/*  get object attributes and check for solo tag  */
+
+	if (KMLFileTagAttrib(this,
+						 kstr))
+		return;
 
 /*  loop over and process fields within opening and closing tags  */
Index: /issm/trunk/src/c/objects/KML/KML_Overlay.cpp
===================================================================
--- /issm/trunk/src/c/objects/KML/KML_Overlay.cpp	(revision 10628)
+++ /issm/trunk/src/c/objects/KML/KML_Overlay.cpp	(revision 10629)
@@ -1,4 +1,4 @@
 /*!\file KML_Overlay.cpp
- * \brief: implementation of the kml_container abstract object
+ * \brief: implementation of the kml_overlay abstract object
  */
 
Index: /issm/trunk/src/c/objects/KML/KML_Placemark.cpp
===================================================================
--- /issm/trunk/src/c/objects/KML/KML_Placemark.cpp	(revision 10628)
+++ /issm/trunk/src/c/objects/KML/KML_Placemark.cpp	(revision 10629)
@@ -127,8 +127,9 @@
 	KML_Object*  kobj;
 
-/*  get object attributes  */
-
-	KMLFileTagAttrib(this,
-					 kstr);
+/*  get object attributes and check for solo tag  */
+
+	if (KMLFileTagAttrib(this,
+						 kstr))
+		return;
 
 /*  loop over and process fields within opening and closing tags  */
Index: /issm/trunk/src/c/objects/KML/KML_Point.cpp
===================================================================
--- /issm/trunk/src/c/objects/KML/KML_Point.cpp	(revision 10628)
+++ /issm/trunk/src/c/objects/KML/KML_Point.cpp	(revision 10629)
@@ -112,8 +112,9 @@
 	char*        kstri;
 
-/*  get object attributes  */
+/*  get object attributes and check for solo tag  */
 
-	KMLFileTagAttrib(this,
-					 kstr);
+	if (KMLFileTagAttrib(this,
+						 kstr))
+		return;
 
 /*  loop over and process fields within opening and closing tags  */
Index: /issm/trunk/src/c/objects/KML/KML_PolyStyle.cpp
===================================================================
--- /issm/trunk/src/c/objects/KML/KML_PolyStyle.cpp	(revision 10628)
+++ /issm/trunk/src/c/objects/KML/KML_PolyStyle.cpp	(revision 10629)
@@ -103,8 +103,9 @@
 	char*        kstri;
 
-/*  get object attributes  */
+/*  get object attributes and check for solo tag  */
 
-	KMLFileTagAttrib(this,
-					 kstr);
+	if (KMLFileTagAttrib(this,
+						 kstr))
+		return;
 
 /*  loop over and process fields within opening and closing tags  */
Index: /issm/trunk/src/c/objects/KML/KML_Polygon.cpp
===================================================================
--- /issm/trunk/src/c/objects/KML/KML_Polygon.cpp	(revision 10628)
+++ /issm/trunk/src/c/objects/KML/KML_Polygon.cpp	(revision 10629)
@@ -167,8 +167,9 @@
 	KML_Object*  kobj;
 
-/*  get object attributes  */
-
-	KMLFileTagAttrib(this,
-					 kstr);
+/*  get object attributes and check for solo tag  */
+
+	if (KMLFileTagAttrib(this,
+						 kstr))
+		return;
 
 /*  loop over and process fields within opening and closing tags  */
Index: /issm/trunk/src/c/objects/KML/KML_Style.cpp
===================================================================
--- /issm/trunk/src/c/objects/KML/KML_Style.cpp	(revision 10628)
+++ /issm/trunk/src/c/objects/KML/KML_Style.cpp	(revision 10629)
@@ -180,8 +180,9 @@
 	char*        kstri;
 
-/*  get object attributes  */
-
-	KMLFileTagAttrib(this,
-					 kstr);
+/*  get object attributes and check for solo tag  */
+
+	if (KMLFileTagAttrib(this,
+						 kstr))
+		return;
 
 /*  loop over and process fields within opening and closing tags  */
