SQL::Translator::Producer::XML - XML output
use SQL::Translator::Producer::XML;
Meant to create some sort of usable XML output.
Takes the following optional producer_args:
producer_args
If this is set to a true value, then tags corresponding to value-less elements will be emitted. For example, take this schema:
CREATE TABLE random ( id int auto_increment PRIMARY KEY, foo varchar(255) not null default '', updated timestamp );
With emit_empty_tags = 1, this will be dumped with XML similar to:
emit_empty_tags
<table> <name>random</name> <order>1</order> <fields> <field> <is_auto_inc>1</is_auto_inc> <list></list> <is_primary_key>1</is_primary_key> <data_type>int</data_type> <name>id</name> <constraints></constraints> <null>1</null> <order>1</order> <size></size> <type>field</type> </field>
With emit_empty_tags = 0, you'd get:
<table> <name>random</name> <order>1</order> <fields> <field> <is_auto_inc>1</is_auto_inc> <is_primary_key>1</is_primary_key> <data_type>int</data_type> <name>id</name> <null>1</null> <order>1</order> <type>field</type> </field>
This can lead to dramatic size savings.
Ken Y. Clark <kclark@cpan.org>
XML::Dumper;
To install SQL::Translator, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SQL::Translator
CPAN shell
perl -MCPAN -e shell install SQL::Translator
For more information on module installation, please visit the detailed CPAN module installation guide.