The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

XML::Axk::Core - awk-like XML processor, core

USAGE

    my $core = XML::Axk::Core->new(\%opts);
    $core->load_script_file($filename);
    $core->load_script_text($source_text, $filename);
    $core->run(@input_filenames);

OPTIONS

A filename of - represents standard input.

OVERVIEW

axk coordinates languages and backends to process XML files. Backends read XML input and provide it to an axk script. Languages are the way that script is expressed. Languages and backends can be mixed arbitrarily, as long as the backend provides the API the language needs.

A single axk script can include code in any number of languages, but can only use one backend. The first backend referenced (implicitly or explicitly) is the one used.

Each language has a default backend, but the user can specify a different backend using a pragma.

SUBROUTINES

XML::Axk::Core->new

Constructor. Takes a hash ref of options

METHODS

load_script_file

Load the named script file from disk, but do not execute it. Usage:

    $core->load_script_file(filename => $name[, ...])

load_script_text

Load the given text, but do not execute it. Usage:

    $core->load_script_text(text => $text[, filename => $name][, ...])

run

Run the loaded script or scripts. Takes a list of inputs. Strings are treated as filenames; references to strings are treated as raw data to be run as if read off disk. A filename of '-' represents STDIN. To process a disk file named '-', read its contents first and pass them in as a ref.

AUTHOR

Christopher White, cxwembedded at gmail.com

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc XML::Axk::Core

You can also look for information at:

NOTE

I just recently found out about Web::Scraper, which has some overlapping functionality. However, XML::Axk is targeted specifically at XML, rather than HTML, and should eventually support dedicated, non-Perl script languages.

LICENSE AND COPYRIGHT

Copyright (c) 2018 Christopher White. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). Details are in the LICENSE file accompanying this distribution.