=head1 NAME

XmlResults - A Perl interface to the DbXml XmlResults Class

=head1 SYNOPSIS

    use Sleepycat::DbXml;

    my $results = $c->queryWithXPath(...);

    my $size = $results->size() ;
    $results->reset();

    my $value = new XmlValue ;
    while ($results->next([$txnid,] $value))
    {
      
    }

    my $document = new XmlDocument ;
    while ($results->next([$txnid,] $document))
    {
      
    }

    while ($results->next([$txnid,] $document, $value))
    {
      
    }


=head1 DESCRIPTION



=head1 CONFORMANCE to C++ API

The Perl interface to XMlValue is identical to the C++ API.

=head1 Constructor

There is no constructor provided for this class. An XmlResults object
is returned from a call to XmlContainer::queryWithXPath.

=head1 Methods

=head2 my $size = $results->size() ;

Returns the number of results in the result set.

=head2 $results->reset();

=head2 $results->next([$txnid,] $value);

Retrieves the next result from the result set and stores it in the
$value parameter. The $value parameter must be an XmlValue object.

Returns true when another result is available, and false otherwise. 

The $txnid parameter, when present, should be a valid DbTxn object.

=head2 $results->next([$txnid,] $document);

=head2 $results->next([$txnid,] $document, $value);

=head1 EXAMPLES

    use strict ;
    use warnings;
    
    use Sleepycat::DbXml 'simple' ;

    eval
    {
	my $container = new XmlContainer("test");
	$container->open(Db::DB_CREATE);
	my $document = new XmlDocument ;
	my $content = <<EOM;
	    <book>
	        <title>
		    Knowledge Discovery in Databases.
		</title>
	    </book>
    EOM

	$document->setContent($content);
	$container->putDocument($document);
	my $results = $container->queryWithXPath("/book");
	my $value = new XmlValue ;

	while($results->next($value))
	{
		my $document = $value->asDocument;
		print $document->getID() . " = " . $value->asString() . "\n";
	}
	$container->close();
	$container->remove();
    };

    my $e;
    
    if ($e = catch std::exception)
    {
        warn $e->what() . "\n";
    }
    elsif ($@)
    {
	warn $@;
    }

=head1 SEE ALSO


=head1 AUTHOR

Paul Marquess
