Exclude a product category with WordPress E-Commerce Plugin

// The categories we want to exclude.
$exclude_categories = array(5, 10, 2);
while (wpsc_have_products()) :  wpsc_the_product();
  $category = get_the_product_category( wpsc_the_product_id() );
  if ( !in_array( $category[0]->term_id, $exclude_categories ) ) :
    // Here you display...
  endif;
endwhile;

And yeah, if you want to exclude a top level category, try something like this :

function get_term_top_parent_id( $term_id, $taxonomy ) {
  $parent = get_term_by( 'id', $term_id, $taxonomy );
  while ( $parent->parent != 0 ) {
    $parent = get_term_by( 'id', $term_id, $taxonomy );
  }
  return $parent->term_id;
}

// ...

$exclude_categories = array(5, 10, 2);
while (wpsc_have_products()) :  wpsc_the_product();
  $category = get_the_product_category( wpsc_the_product_id() );
  if ( !in_array( get_term_top_parent_id( $category[0]->term_id, 'wpsc_product_category' ), $exclude_categories ) ) :
    // Here you display...
  endif;
endwhile;