View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Henrik Mårtensson > XML-XMetaL-0.52 > XML::XMetaL::Factory



Annotate this POD

View/Report Bugs


XML::XMetaL::Factory - XMetaL factory class


 use XML::XMetaL::Factory;
 my $factory = XML::XMetaL::Factory->new();
 my $xml_doc_1 = '...';# A serialized XML document
 my $xml_doc_2 = 'd:\documents\xml\my_doc.xml';# Path to XML file
 my $xmetal = $factory->create_xmetal($xml_doc_1, $xml_doc_2);


XML::XMetaL::Factory is a factory class for creating XMetaL instances.

XML::XMetaL::Factory creates XMetaL instances, ensures that processing does not continue until initialization is complete, and provides XMetaL with a basic lean-up routine that will be implemented automatically when XMetaL is closed.

XML::XMetaL::Factory is meant for use by external scripts that need to instantiate an XMetaL application object. The most obvious use is by test scripts.

Using XML::XMetaL::Factory it is possible to write unit and function tests for XMetaL customization packages. This is important for more reasons than good programming style. Coupled with the capability to do object oriented development, it becomes possible to develop XMetaL applications using agile development methodologies such as Extreme Programming. You can find out more about Extreme Programming at

Public methods ^

Constructor and initialization

 my $factory = XML::XMetaL::Factory->new()

The constructor takes no arguments. It returns a factory object that can be used to create XMetaL application objects.


 my $xmetal_application = $factory->create_xmetal(@document_list);

The create_xmetal method takes a list of scalar variables as arguments. An element in the list must either contain an XML document as a string, or a file path.

There is currently no support for filehandles, URLs, filepaths, or DOM document objects of any kind.

The create_xmetal method returns an XMetaL Application object.

Private Methods ^

None you want to mess with. The implementation is likely to change in future versions.


The Corel XMetaL XML editor must be installed.


Currently, the XMetaL application object is created when the factory object is created. The create_xmetal method merely opens documents and returns the already existing application object.

Please send bug reports to <>.


See XML::XMetaL.


Henrik Martensson, <<gt>


Copyright 2003 by Henrik Martensson

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

syntax highlighting: