XML::XQL 0.68 review

Download
by rbytes.net on

XML::XQL is a perl module for querying XML tree structures with XQL. SYNOPSIS use XML::XQL; use XML::XQL::DOM; $parser =

License: Perl Artistic License
File size: 117K
Developer: T.J. Mather
0 stars award from rbytes.net

XML::XQL is a perl module for querying XML tree structures with XQL.

SYNOPSIS

use XML::XQL;
use XML::XQL::DOM;

$parser = new XML::DOM::Parser;
$doc = $parser->parsefile ("file.xml");

# Return all elements with tagName='title' under the root element 'book'
$query = new XML::XQL::Query (Expr => "book/title");
@result = $query->solve ($doc);
$query->dispose; # Avoid memory leaks - Remove circular references

# Or (to save some typing)
@result = XML::XQL::solve ("book/title", $doc);

# Or (to save even more typing)
@result = $doc->xql ("book/title");

The XML::XQL module implements the XQL (XML Query Language) proposal submitted to the XSL Working Group in September 1998. The spec can be found at: http://www.w3.org/TandS/QL/QL98/pp/xql.html Most of the contents related to the XQL syntax can also be found in the XML::XQL::Tutorial that comes with this distribution. Note that XQL is not the same as XML-QL!

The current implementation only works with the XML::DOM module, but once the design is stable and the major bugs are flushed out, other extensions might follow, e.g. for XML::Grove.

XQL was designed to be extensible and this implementation tries to stick to that. Users can add their own functions, methods, comparison operators and data types. Plugging in a new XML tree structure (like XML::Grove) should be a piece of cake.
To use the XQL module, either

use XML::XQL;
or
use XML::XQL::Strict;

The Strict module only provides the core XQL functionality as found in the XQL spec. By default (i.e. by using XML::XQL) you get 'XQL+', which has some additional features.

See the section "Additional Features in XQL+" for the differences.
This module is still in development. See the To-do list in XQL.pm for what still needs to be done. Any suggestions are welcome, the sooner these implementation issues are resolved, the faster we can all use this module.

If you find a bug, you would do me great favor by sending it to me in the form of a test case. See the file t/xql_template.t that comes with this distribution.

If you have written a cool comparison operator, function, method or XQL data type that you would like to share, send it to tjmather@tjmather.com and I will add it to this module.

Requirements:
Perl

XML::XQL 0.68 keywords