The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

XML::NewsML_G2::Package_Item - a package of news items

SYNOPSIS

    my $pi = XML::NewsML_G2::Package_Item->new
        (language => 'de', provider => $prov_apa);
    $pi->add_to_root_group($text_item, $pic_item);

DESCRIPTION

A package item is a collection of news items, that are published together. The structure of packages is flexible to support nested groups of items - please see the NewsML-G2 specification for details.

Each package item is built up by one root group, which is an instance of XML::NewsML_G2::Group.

ATTRIBUTES

title Optional title of the package.
root_group

Upon creation of the package item, a new, empty XML::NewsML_G2::Group is created and stored in the root_group attribute.

root_role

The root group needs a role that specifies the type of content the package contains. Defaults to 'main'.

root_id

All groups are identified by IDs. This attribute is used to name the root group - all other groups are named automatically. Defaults to 'root_group'.

METHODS

add_to_root_group

Use this method to add news items and groups to the root group.

AUTHOR

Philipp Gortan <philipp.gortan@apa.at>

LICENCE AND COPYRIGHT

Copyright (c) 2014, APA-IT. All rights reserved.

See XML::NewsML_G2 for the license.