XML::Grammar::Fortune is a Perl module that allows one to collect quotes (or Unix-like fortune cookies) using an XML grammar, with a lot of rich meta-data, and to produce XHTML and plaintext from them.
SYNOPSIS
use XML::Grammar::Fortune;
# Validate files.
my $validator =
XML::Grammar::Fortune->new(
{
mode => "validate"
}
);
# Returns 0 upon success - dies otherwise
exit($validator->run({input => "my-fortune-file.xml"}));
# Convert files to XHTML.
my $converter =
XML::Grammar::Fortune->new(
{
mode => "convert_to_html",
output_mode => "filename"
}
)
$converter->run(
{
input => "my-fortune-file.xml",
output => "resultant-file.xhtml",
}
)
Product's homepage
Requirements:
· Perl