methods.ringing.orgHome > For programmers > Perl

Ringing::XML::Library

NAME

Ringing::XML::Library - access a remote XML method library

SYNOPSIS

use Ringing::XML::Library;

$library = new Ringing::XML::Library;
$methods = $library->query('name=Lincolnshire&fields=title|pn');

DESCRIPTION

This module is for accessing the online method database at http://methods.ringing.org/.

CONSTRUCTOR

$library = new Ringing::XML::Library 
  ('http://methods.ringing.org/cgi-bin/simple.pl');

The constructor initialises the database client. The one optional argument is the URL of the script used to query the database; if unspecified, the default is the one shown here.

QUERYING THE DATABASE

$methods = $library->query($query_string);

The query function is used for querying the database. It sends an HTTP query, checks that the result is a valid XML document, and returns a Ringing::XML::Methods object containing the result. If either an HTTP error occurs, or the content of the response is not a valid XML document, an error is thrown.

For information on the format of the query string, see http://methods.ringing.org/query.html.

SEE ALSO

Ringing::XML::Methods, Ringing::XML::Method

AUTHOR

Martin Bright <martin@boojum.org.uk>

COPYRIGHT AND LICENCE

Copyright (C) 2004 Martin Bright

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


Valid HTML 4.01!Valid CSS!Powered by LibXSLT

Comments to the Webmaster. Last updated 17 November 2004. This site is generously hosted by Mythic Beasts.