View on
MetaCPAN
Dan Sully > XML-XSPF > XML::XSPF

Download:
XML-XSPF-0.7.1.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.7.1   Source  

NAME ^

XML::XSPF - API for reading & writing XSPF Playlists

SYNOPSIS ^

  use strict;
  use XML::XSPF;
  use XML::XSPF::Track;

  my $playlist = XML::XSPF->parse($filenameOrString);

  print "count: " . $playlist->trackList . "\n";

  for my $track ($playlist->trackList) {

    if ($track->title) {
         print $track->title . "\n";
    }

    if ($track->location) {
         print $track->location . "\n";
    }
  }

  my $xspf  = XML::XSPF->new;
  my $track = XML::XSPF::Track->new;

  $track->title('Prime Evil');
  $track->location('http://orb.com/PrimeEvil.mp3');

  $xspf->title('Bicycles & Tricycles');
  $xspf->trackList($track);

  print $xspf->toString;

DESCRIPTION ^

This is a parser and generator for the XSPF playlist format.

METHODS ^

BUGS ^

SEE ALSO ^

XSPF Version 1 Spec:
  http://www.xspf.org/xspf-v1.html
Slim Devices:
  http://www.slimdevices.com/

AUTHOR ^

Dan Sully <daniel | at | cpan.org> & Slim Devices, Inc.

COPYRIGHT AND LICENSE ^

Copyright (c) 2006 Dan Sully & Slim Devices, Inc. All rights reserved. Copyright (c) 2006-2009 Dan Sully. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: