Embedix::ECD::XMLv1 - adds a method to write ECD data as XML
Load appropriate modules first
use Embedix::ECD; use Embedix::ECD::XMLv1 qw(xml_from_cons);
load an ECD and print it as XML
my $ecd->newFromFile('tinylogin.ecd'); print $ecd->toXML;
If you want to preserve comments, use a cons instead of an Embedix::ECD object.
my $cons = Embedix::ECD->consFromFile('tinylogin.ecd'); print xml_from_cons($cons);
This is the module Embedix::ECD::XMLv1 augments.
This module adds a few methods to the Embedix::ECD namespace for the purposes of XML generation. The reason it has been separated from the main module is to allow one to only load this module when necessary and to save memory when you it's not.
A cons (or nested arrayref) is generated from the constructors in Embedix::ECD that have names starting with "cons". This method will take a cons and generate well-formed XML from it. Because a cons preserves comments in an ECD, xml_from_cons() is able to preserve comments in the XML it generates.
Although the XML this generates will be well-formed, it runs a high risk of not being valid, because it cannot (yet?) order the attributes in accordance w/ the current DTD.
not implemented.
This generates an XML expression of an ECD in accordance to the DTD found in $Embedix::ECD::XMLv1::__dtd. The generated XML will be well-formed and valid.
This does the same thing as attributeToString() but generates XML, instead.
This contains the Document Type Definition for the XML version of the ECD format.
John BEPPU <beppu@lineo.com>
Embedix::ECD(3pm)
To install Embedix::ECD, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Embedix::ECD
CPAN shell
perl -MCPAN -e shell install Embedix::ECD
For more information on module installation, please visit the detailed CPAN module installation guide.