Index: trunk/ippToPsps/config/parse_schema_browser.pl
===================================================================
--- trunk/ippToPsps/config/parse_schema_browser.pl	(revision 38819)
+++ trunk/ippToPsps/config/parse_schema_browser.pl	(revision 38819)
@@ -0,0 +1,75 @@
+#! /usr/bin/env perl
+
+use strict;
+use warnings;
+
+my $file = shift(@ARGV);
+open(F,$file);
+
+open(TT,">./SchemaTableType.csv");
+open(TB,">./SchemaTables.csv");
+
+my $depth = 0;
+my $Ntypes = 0;
+my $Ntables = 0;
+my $string = '';
+while (<F>) {
+    chomp;
+    if ($_ =~ /<RESOURCE /) {
+	$depth++;
+	if ($depth == 1) {
+	    ($Ntypes,$Ntables,$string) = do_type($Ntypes,$Ntables,$_);
+	    print TT $string;
+	}
+	elsif ($depth == 2) {
+	    ($Ntypes,$Ntables,$string) = do_table($Ntypes,$Ntables,$_);
+	    print TB $string;
+	}
+    }
+    elsif ($_ =~ /<TABLE /) {
+	if ($depth == 1) {
+	    ($Ntypes,$Ntables,$string) = do_table($Ntypes,$Ntables,$_);
+	    print TB $string;
+	}
+    }
+    elsif ($_ =~ /<\/RESOURCE>/) {
+	$depth--;
+    }
+}
+close(F);
+close(TT);
+close(TB);
+
+sub do_type {
+    my $Ntypes = shift;
+    my $Ntables = shift;
+    my $string = shift;
+    
+    my $name = $_;
+    $name =~ s/^.*name="//;
+    $name =~ s/">.*$//;
+    
+    $Ntypes++;
+
+    # Type index, name in quotes
+    $string = "${Ntypes}, '${name}'\n";
+    return($Ntypes,$Ntables,$string);
+}
+
+sub do_table {
+    my $Ntypes = shift;
+    my $Ntables = shift;
+    my $string = shift;
+
+    my $name = $_;
+    $name =~ s/^.*name="//;
+    $name =~ s/">.*$//;
+
+    $Ntables++;
+
+    # Table index, name in quotes, Type index to map to, Enabled flag that should always be 1
+    $string = "${Ntables}, '${name}', ${Ntypes}, 1\n";
+    return($Ntypes,$Ntables,$string);
+}    
+
+    
