NAME
SQL::Translator::Producer::XML - XML output
SYNOPSIS
use SQL::Translator::Producer::XML;
DESCRIPTION
Meant to create some sort of usable XML output.
ARGS
Takes the following optional 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:<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.
AUTHOR
Ken Y. Clark <kclark@cpan.org>
SEE ALSO
XML::Dumper;