Rolled in Darren's new list_[producers|parsers], lots of cosmetic changes,
[dbsrgits/SQL-Translator.git] / lib / SQL / Translator / Producer / XML.pm
1 package SQL::Translator::Producer::XML;
2
3 # -------------------------------------------------------------------
4 # $Id: XML.pm,v 1.3 2002-11-22 03:03:40 kycl4rk Exp $
5 # -------------------------------------------------------------------
6 # Copyright (C) 2002 Ken Y. Clark <kclark@cpan.org>,
7 #                    darren chamberlain <darren@cpan.org>
8 #
9 # This program is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU General Public License as
11 # published by the Free Software Foundation; version 2.
12 #
13 # This program is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 # General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21 # 02111-1307  USA
22 # -------------------------------------------------------------------
23
24 =head1 NAME
25
26 SQL::Translator::Producer::XML - XML output
27
28 =head1 SYNOPSIS
29
30   use SQL::Translator::Producer::XML;
31
32 =head1 DESCRIPTION
33
34 Meant to create some sort of usable XML output.
35
36 =cut
37
38 use strict;
39 use vars qw( $VERSION );
40 $VERSION = sprintf "%d.%02d", q$Revision: 1.3 $ =~ /(\d+)\.(\d+)/;
41
42 use XML::Dumper;
43
44 sub produce {
45     my ( $self, $data ) = @_;
46     my $dumper = XML::Dumper->new;
47     return $dumper->pl2xml( $data );
48 }
49
50 1;
51
52 # -------------------------------------------------------------------
53 # The eyes of fire, the nostrils of air,
54 # The mouth of water, the beard of earth.
55 # William Blake
56 # -------------------------------------------------------------------
57
58 =pod
59
60 =head1 AUTHOR
61
62 Ken Y. Clark E<lt>kclark@cpan.orgE<gt>
63
64 =head1 SEE ALSO
65
66 XML::Dumper;
67
68 =cut