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

NAME

XML::NewsML_G2::News_Item - a news item (story)

SYNOPSIS

    my $ni = XML::NewsML_G2::News_Item->new
        (guid => "tag:example.com,2013:service:date:number",
         title => "Story title",
         slugline => "the/slugline",
         language => 'de',
         provider => $provider,
         service => $service,
        );

    $ni->add_genre($genre1, $genre2);
    $ni->add_source('APA');
    $ni->add_paragraph('blah blah blah');

ATTRIBUTES

authors

List of strings containing names of the news item's authors

cities

List of strings containing city names where the story has been written down (as opposed to: where the story occured)

closing

Final comment on planned updates of this story

content_created

DateTime instance, defaults to now

content_modified

DateTime instance

desks

List of XML::NewsML_G2::Desk instances

doc_status

Defaults to "usable".

doc_version

Defaults to "1"

embargo

DateTime instance

embargo_text

additional text for specifying details on the embargo

genres

List of XML::NewsML_G2::Genre instances

guid

"identifier that is guaranteed to be globally unique for all time and independent of location". Defaults to a UUID

indicators

List of strings to signal additional information

language

language of the story, required. E.g. "en", "de", ...

locations

Hash mapping qcodes to XML::NewsML_G2::Location instances

media_topics

Hash mapping qcodes to XML::NewsML_G2::Media_Topic instances

message_id

Human-readable alternative ID of the story

note

Editorial notes

organisations

List of XML::NewsML_G2::Organisation instances

paragraphs

An XML::LibXML::Node instance containing the content (quite likely p elements, hence the name) of the story - to be put into the XHTML body. Use the add_paragraph method to add text unless you want more control of the output.

priority

Numeric message priority, defaults to 5

products

List of XML::NewsML_G2::Product instances

provider

List of XML::NewsML_G2::Provider instances

see_also

Free-format string

service

XML::NewsML_G2::Service instance

slugline

String containing the slugline

slugline_sep

Slugline separator, defaults to "/"

sources

List of strings containing story source names

subtitle

Subtitle string

title

Title string

topics

List of XML::NewsML_G2::Topic instances

METHODS

add_author

Add a string to the authors

add_city

Add a string to the cities

add_desk

Add a XML::NewsML_G2::Desk instance

add_genre

Add a XML::NewsML_G2::Genre instance

add_indicator

Add a string to the indicators

add_location

Add a new XML::NewsML_G2::Location instance

add_media_topic

Add a new XML::NewsML_G2::MediaTopic instance

add_organisation

Add a new XML::NewsML_G2::Organisation instance

add_paragraph

Takes a string to be added to the paragraphs Node instance as a p element. To have more control over the created XHTML output, directly set the paragraphs attribute with a Node instance you created by yourself.

add_product

Add a new XML::NewsML_G2::Product instance

add_source

Add a string to the sources

add_topic

Add a new XML::NewsML_G2::Topic instance

AUTHOR

Philipp Gortan <philipp.gortan@apa.at>

LICENCE AND COPYRIGHT

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

See XML::NewsML_G2 for the license.