XML::OPML::SimpleGen(3pm)

XML::OPML::SimpleGen3pm

Create opml using xml::simple

Usage

    require XML::OPML::SimpleGen;
    my $opml = new XML::OPML::SimpleGen();
    $opml->head(
             title => 'FIFFS Subscriptions',
           );
    $opml->insert_outline(
        group => 'news',  # groups will be auto generated
        text =>  'some feed',
        xmlUrl => 'http://www.somepage.org/feed.xml',
    );
    # insert_outline and add_outline are the same
    $opml->add_group( text => 'myGroup' ); # explicitly create groups
   
    print $opml->to_string;
    $opml->save('somefile.opml');
    $opml->xml_options( $hashref ); # XML::Simple compatible options
    # See XML::OPML's synopsis for more knowledge

Version

version 0.07

Overview

XML::OPML::SimpleGen lets you simply generate OPML documents without having too much to worry about. It is a drop-in replacement for XML::OPML in regards of generation. As this module uses XML::Simple it is rather generous in regards of attribute or element names.

Common methods

new( key => value )

Creates a new XML::OPML::SimpleGen instance. All key values will be used as attributes for the <atom> element. The only thing you might want to use here is the version => '1.1', which is default anyway.

head( key => value )

XML::OPML compatible head method to change header values.

id ( )

Returns (and increments) a counter.

add_group ( text => 'name' )

Method to explicitly create a group which can hold multiple outline elements.

insert_outline ( key => value )

XML::OPML compatible method to add an outline element. See XML::OPML for details. The group key is used to put elements in a certain group. Non existent groups will be created automagically.

add_outline ( key => value )

Alias to insert_outline for XML::OPML compatibility.

as_string

Returns the given OPML XML data as a string

save ( $filename )

Saves the OPML data to a file

Advanced methods

xml_options ( $hashref )

$hashref may contain any XML::Simple options.

outline ( $hashref )

The outline method defines the 'template' for any new outline element. You can preset key value pairs here to be used in all outline elements that will be generated by XML::OPML::SimpleGen.

group ( $hashref )

This method is similar to outline, it defines the template for a grouping outline element.

Maintainer

Stephen Cardie "<[email protected]>"

Repository

<https://github.com/stephenca/XML-OPML-SimpleGen>

Contributors

KAPPA "<[email protected]>" contributed a patch to close RT51000 <https://rt.cpan.org/Public/Bug/Display.html?id=51000>
[email protected] contributed a patch to close RT77725 <https://rt.cpan.org/Public/Bug/Display.html?id=77725>

Repo

  The git repository for this module is at
L<https://github.com/stephenca/XML-OPML-SimpleGen>

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 4 times.

  1. 6.0
  2. 7
  3. 8–10
  4. 11
  5. 12–13

Bugs

Please report any bugs or feature requests to "[email protected]", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=XML-OPML-SimleGen>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

Author

Marcus Theisen <[email protected]>

From libxml-opml-simplegen-perl 0.07-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.