--- trunk/jsFind.pm 2004/07/21 15:34:03 7 +++ trunk/jsFind.pm 2004/07/21 15:44:15 8 @@ -695,7 +695,7 @@ Create jsFind xml files - my $nr=$tree->to_dot('/path/to/index','0'); + my $nr=$tree->to_jsfind('/path/to/index','0'); Returns number of elements created @@ -707,6 +707,9 @@ return 0 if $self->is_empty; + confess("path is undefined.") unless ($path); + confess("file is undefined. Did you call \$t->root->to_jsfind(..) instead of \$t->to_jsfind(..) ?") unless (defined($file)); + my $nr_keys = 0; my ($k, $d, $s) = @$self;