NewsML is a standard format for the markup of multimedia news content, ratified by the International Press Telecommunications Council (http://www.iptc.org). According to the newsml.org website NewsML is "An XML-based standard to represent and manage news throughout its lifecycle, including production, interchange, and consumer use."
NewsML differs from simpler standards such as RSS in that RSS sends links to stories, where NewsML can be used to send links or the story itself, plus any associated information such as images, video or audio files, PDF documents, or any other type of data.
NewsML also offers much more metadata information than RSS, including links between associated content; the ability to revoke, update or modify previously sent stories; support for sending the same story in multiple languages and/or formats; and a method for user-defined metadata known as Topic Sets.
Syndication::NewsML is an object-oriented Perl interface to NewsML documents, allowing you to manage (and one day create) NewsML documents without any specialised NewsML or XML knowledge.
You can find out more about NewsML at http://www.iptc.org/site/NewsML/ or http://www.newsml.org/
The latest version is 0.10, released 14 February 2002.
Download: http://www.cpan.org/authors/id/B/BQ/BQUINN/
- internals: separated some classes out into NewsML/ directory
- getXXXList now returns a real array when called in an array context. NOTE this may break some code, notably function calls like myRoutine($newscomp->getNewsItemList) will now be passed an array rather than an array reference. Sorry bout that, but remember, this is pre-release software you're working with...
- fixed bug that didn't allow multiple Party elements
- fixed bug: dies when asking for an attribute that doesn't exist
- greatly enhanced examples/NewsMLParser.pl
- added AFP example file
- added IPTC topic files (we don't use them yet, though)
- one simple bugfix to make the test suite pass...
- Added some generic methods to Syndication::NewsML::Node (and therefore all object classes):
Thanks to Peter Hilbring for giving me the prodding required to get this done :-)
See the Changes file for previous releases.
The lazy way to install Syndication::NewsML:
$ perl -MCPAN -e shell cpan> install Syndication::NewsML
Or the normal way:
Retrieve the latest copy from CPAN: http://www.cpan.org/authors/id/B/BQ/BQUINN/
$ perl Makefile.PL # Creates the Makefile $ make # Runs the makefile $ make test # Optional (See Interopability below) $ make install # Installs Syndication::NewsML into your Perl library location
With this method you will first have to install the pre-requisite module XML::DOM. See "what are the prerequisites?".
XML::DOM (Have not tested lower than v1.27)
Perl5 (Have not tested lower than v5.6)
To get the latest versions of the prerequisite module you can simply type this at the command prompt:
$ perl -MCPAN -e shell cpan> install XML::DOM
or if you just 'install Syndication::NewsML' the CPAN module should automagically install all of the prerequisites for you.
Syndication::NewsML should work on any machine that supports XML::DOM, and any filesystem including Windows, although I haven't tested it on Windows yet. It's still early days, so expect some bugs.
Once you've installed, you can type:
$ perldoc Syndication::NewsML
Or you can view them starting from here: Syndication::NewsML,
The best place to ask questions now would be the NewsML mailing list at http://groups.yahoo.com/group/newsml/, or ask me directly at brendan\@clueful.com.au. If there is enough demand we may start up a specialised list.
General Perl/XML questions should be asked on the Perl-XML mailing list, which you can find at http://aspn.activestate.com/ASPN/Mail/Browse/Threaded/perl-xml
The standard make test test suite checks most elements in a small range of test NewsML documents obtained from the Net. You can find the test documents in the t/test_data/ directory.
make test
t/test_data/
I haven't written complete unit tests yet (after all there are 127 classes), so some methods remain untested. However the test documents include a fairly standard range of elements, so you should be able to get somewhere with the methods that work so far.
There are probably bugs all over the place -- this is still an early version.
At the moment, Syndication::NewsML only reads NewsML files -- in the future it should be able to modify and write them as well.
Syndication::NewsML
See TODO for what I'm thinking of building and what would be nice to have.
This module is Copyright (C) 2001 by
Brendan Quinn Clueful Consulting Pty Ltd GPO Box 2747EE Melbourne 3001 Victoria, AUSTRALIA
All rights reserved.
This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.
$Id: README.pod,v 0.8 2002/01/16 04:37:56 brendan Exp brendan $
2 POD Errors
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head2'
=back without =over
To install Syndication::NewsML, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Syndication::NewsML
CPAN shell
perl -MCPAN -e shell install Syndication::NewsML
For more information on module installation, please visit the detailed CPAN module installation guide.