my $obj = $factory->create_element( $node_name, @args ); # Check to see if $obj represents a 'foobar' node if ( $obj->isa( 'foobar' ) ) { # Do something }