Eric R. Meyers > WWW-WhitePages > WWW::WhitePages::XML

Download:
WWW-WhitePages-2008.0924.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 2008.0924   Source  

NAME ^

WWW::WhitePages::XML - General Extensible Markup Language capabilities go in here.

SYNOPSIS ^

require WWW::WhitePages::XML;

WWW::WhitePages::XML::demo();

-OR-

require WWW::WhitePages::XML;

require Text::CSV;

my $request = WWW::WhitePages::XML::API::find_person( 'firstname' => 'Larry', 'lastname' => 'Wall', );

my $result = WWW::WhitePages::XML::API::ua_request( $request );

my $control = { 'level' => 0, 'xml' => [ $result->content() ], 'order_out' => [], 'columns_out' => [], };

WWW::WhitePages::XML::parse_find_person_to_csv( $control );

my $csv_out = Text::CSV->new();

my $status_out = $csv_out->combine( $control->{'order_out'} );

print $csv_out->string() . "\n"; ## prints header

for ( my $i = 0; $i <= $#{$control->{'columns_out'}}; $i++ ) { $status_out = $csv_out->combine( @{$control->{'columns_out'}->[$i]} );

   print $csv_out->string() . "\n"; prints data

} ## end for

OPTIONS ^

NONE

DESCRIPTION ^

WWW::WhitePages::XML::demo();

This is a simple demo, better read than run.

WWW::WhitePages::XML::parse_find_person_to_csv( $control );

Parses find_person XML into tabular array of data.

SEE ALSO ^

WWW::WhitePages WWW::WhitePages::XML::API

AUTHOR ^

 Copyright (C) 2008 Eric R. Meyers E<lt>Eric.R.Meyers@gmail.comE<gt>
syntax highlighting: