NAME
XML::DB::Service::XPathQueryService - provides XPath queries
SYNOPSIS
$service = $collection->getService('XPathQueryService', '1.0'); $resourceSet1 = $service->query($xpath); $resourceSet2 = $service->queryResource($xpath, $resourceId);
DESCRIPTION
Implements XML::DB::Service. Provides XPath queries relative to the Collection it is fetched from.
BUGS
AUTHOR
Graham Seaman
CPAN ID: GSEAMAN
graham@opencollector.org
COPYRIGHT
Copyright (c) 2002 Graham Seaman. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
BUGS
SEE ALSO
XML::DB::Service
PUBLIC METHODS
clearNamespaces
Usage clearNamespaces()
Purpose clears the namespace map
Arguments none
Returns void
getNamespace
Usage my $uri = $service->getNamespace($prefix)
Purpose Returns the uri associated with a prefix
Arguments $prefix
Returns uri associated with prefix; default uri for empty prefix, or undef for prefix not found
removeNamespace
Usage $service->removeNamespace($prefix)
Purpose Removes the uri associated with a prefix, or the default namespace if prefix is empty
Arguments $prefix
Returns void
setNamespace
Usage: $service->setNamespace($prefix, $url)
Purpose: Associates a uri with a prefix; if prefix is null, the default namespace is set to the uri
Arguments: $prefix, $uri
Returns: void
Throws: Exception if both uri and prefix are undefined
query
Usage : $resourceSet = query($XPath)
Purpose : Executes a query against a collection
Arguments : xpath query string
Returns : ResourceSet
Throws : Exception
queryResource
$xpath - query string
$id - id of resource to query
Usage : $resourceSet = query($XPath, $id)
Purpose : Executes a query against a resource in the collection
Arguments:
Returns : ResourceSet
Throws : Exception
new
Usage : Should only be called indirectly, from a Collection (see Synopsis)
Purpose : Constructor