Index: /trunk/psModules/src/pslib/psMetadataItemParse.c
===================================================================
--- /trunk/psModules/src/pslib/psMetadataItemParse.c	(revision 6996)
+++ /trunk/psModules/src/pslib/psMetadataItemParse.c	(revision 6997)
@@ -1,8 +1,56 @@
 #include <stdio.h>
+#include <stdlib.h>
 #include "pslib.h"
 
 # define PS_METADATA_ITEM_PARSE_NUMBER(INTYPE,OUTTYPE) \
-case PS_DATA_##INTYPE: { \
-    return (ps##OUTTYPE)(item->data.INTYPE); } \
+case PS_DATA_##INTYPE: \
+return (ps##OUTTYPE)(item->data.INTYPE); \
+
+
+// NOTE: This function flows through so that errors may be handled by the "default" case.
+#define PS_METADATA_ITEM_PARSE_STRING_FLOAT(OUTTYPE,FUNCTION) \
+case PS_DATA_STRING: { \
+    char *end = NULL; \
+    ps##OUTTYPE number = FUNCTION(item->data.V, &end); \
+    if (end != item->data.V) { \
+        return number; \
+    } \
+}
+
+// NOTE: This function flows through so that errors may be handled by the "default" case.
+#define PS_METADATA_ITEM_PARSE_STRING_INT(OUTTYPE,FUNCTION) \
+case PS_DATA_STRING: { \
+    char *end = NULL; \
+    ps##OUTTYPE number = FUNCTION(item->data.V, &end, 10); \
+    if (end != item->data.V) { \
+        return number; \
+    } \
+}
+
+psBool psMetadataItemParseBool(psMetadataItem *item
+                              )
+{
+    switch (item->type) {
+        PS_METADATA_ITEM_PARSE_NUMBER(F32, Bool);
+        PS_METADATA_ITEM_PARSE_NUMBER(F64, Bool);
+        PS_METADATA_ITEM_PARSE_NUMBER(S8,  Bool);
+        PS_METADATA_ITEM_PARSE_NUMBER(S16, Bool);
+        PS_METADATA_ITEM_PARSE_NUMBER(S32, Bool);
+        PS_METADATA_ITEM_PARSE_NUMBER(U8,  Bool);
+        PS_METADATA_ITEM_PARSE_NUMBER(U16, Bool);
+        PS_METADATA_ITEM_PARSE_NUMBER(U32, Bool);
+    case PS_DATA_STRING:
+        if (strcasecmp(item->data.V, "true") == 0) {
+            return true;
+        } else if (strcasecmp(item->data.V, "false") == 0) {
+            return false;
+        }
+        // Flow through
+    default:
+        psError(PS_ERR_IO, true, "Item %s (%s) is not of boolean type (%x) --- treating as false.\n",
+                item->name, item->comment, item->type);
+        return false;
+    }
+}
 
 psF32 psMetadataItemParseF32(psMetadataItem *item
@@ -18,4 +66,6 @@
         PS_METADATA_ITEM_PARSE_NUMBER(U16, F32);
         PS_METADATA_ITEM_PARSE_NUMBER(U32, F32);
+        PS_METADATA_ITEM_PARSE_STRING_FLOAT(F32, strtof);
+        // Flow through
     default:
         psError(PS_ERR_IO, true, "Item %s (%s) is not of floating point type (%x) --- treating as NaN.\n",
@@ -37,4 +87,6 @@
         PS_METADATA_ITEM_PARSE_NUMBER(U16, F64);
         PS_METADATA_ITEM_PARSE_NUMBER(U32, F64);
+        PS_METADATA_ITEM_PARSE_STRING_FLOAT(F32, strtod);
+        // Flow through
     default:
         psError(PS_ERR_IO, true, "Item %s (%s) is not of double-precision floating point type (%x) "
@@ -56,4 +108,6 @@
         PS_METADATA_ITEM_PARSE_NUMBER (U16, U8);
         PS_METADATA_ITEM_PARSE_NUMBER (U32, U8);
+        PS_METADATA_ITEM_PARSE_STRING_INT(U8,strtoul);
+        // Flow through
     default:
         psError(PS_ERR_IO, true, "Item %s (%s) is not of integer type (%x) --- treating as zero.\n",
@@ -75,4 +129,6 @@
         PS_METADATA_ITEM_PARSE_NUMBER (U16, U16);
         PS_METADATA_ITEM_PARSE_NUMBER (U32, U16);
+        PS_METADATA_ITEM_PARSE_STRING_INT(U16,strtoul);
+        // Flow through
     default:
         psError(PS_ERR_IO, true, "Item %s (%s) is not of integer type (%x) --- treating as zero.\n",
@@ -94,4 +150,6 @@
         PS_METADATA_ITEM_PARSE_NUMBER (U16, U32);
         PS_METADATA_ITEM_PARSE_NUMBER (U32, U32);
+        PS_METADATA_ITEM_PARSE_STRING_INT(U32,strtoul);
+        // Flow through
     default:
         psError(PS_ERR_IO, true, "Item %s (%s) is not of integer type (%x) --- treating as zero.\n",
@@ -113,4 +171,6 @@
         PS_METADATA_ITEM_PARSE_NUMBER(U16, S8);
         PS_METADATA_ITEM_PARSE_NUMBER(U32, S8);
+        PS_METADATA_ITEM_PARSE_STRING_INT(S8,strtol);
+        // Flow through
     default:
         psError(PS_ERR_IO, true, "Item %s (%s) is not of integer type (%x) --- treating as zero.\n",
@@ -132,4 +192,6 @@
         PS_METADATA_ITEM_PARSE_NUMBER(U16, S16);
         PS_METADATA_ITEM_PARSE_NUMBER(U32, S16);
+        PS_METADATA_ITEM_PARSE_STRING_INT(S16,strtol);
+        // Flow through
     default:
         psError(PS_ERR_IO, true, "Item %s (%s) is not of integer type (%x) --- treating as zero.\n",
@@ -151,4 +213,6 @@
         PS_METADATA_ITEM_PARSE_NUMBER(U16, S32);
         PS_METADATA_ITEM_PARSE_NUMBER(U32, S32);
+        PS_METADATA_ITEM_PARSE_STRING_INT(S32,strtol);
+        // Flow through
     default:
         psError(PS_ERR_IO, true, "Item %s (%s) is not of integer type (%x) --- treating as zero.\n",
Index: /trunk/psModules/src/pslib/psMetadataItemParse.h
===================================================================
--- /trunk/psModules/src/pslib/psMetadataItemParse.h	(revision 6996)
+++ /trunk/psModules/src/pslib/psMetadataItemParse.h	(revision 6997)
@@ -3,4 +3,6 @@
 
 #include "pslib.h"
+
+psBool psMetadataItemParseBool(psMetadataItem *item);
 
 psF32 psMetadataItemParseF32(psMetadataItem *item);
