View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Christian Glahn > Apache-AxKit-Provider-DOM-0.01 > Apache::AxKit::Provider::DOM



Annotate this POD

View/Report Bugs
Module Version: 0.01   Source  


Apache::AxKit::Provider::DOM - Base Class For Parsed XML Providers


  use base Apache::AxKit::Provider::DOM;


Apache::AxKit::Provider::DOM allows to pass a parsed XML document directly to AxKit. It can be used as a base class for application providers, that create XML documents in memory. So Apache::AxKit::Provider::DOM provides an easy way to write application providers for AxKit 1.6.

Commonly an inheritated class only implements the provider function 'init()' and if required the provider function 'get_styles()'.

To make the provider work properly a class must provide the document tree in the special provider key 'dom_tree'.

A sample DOM provider could be:

  package MyDomProvider;

  use vars (@INC);
  use XML::LibXML;
  use Apache::AxKit::Provider::DOM;
  @INC = ('Apache::AxKit::Provider::DOM');

  sub init {
      my $class = shift;
      $class->{dom_tree} = XML::LibXML->new;
         $class->{dom_tree}->createElement( 'foo' );


This sample provider would cause AxKit to use the default style as provided in the style map of the server configuration.

If a provider based on Apache::AxKit::Provider::DOM and does not set the 'dom_tree' key as shown in the example AxKit will not process this ressource.


AxKit, Apache::AxKit::Provider

syntax highlighting: