My guess would be that, since you are using unknown namespace 'g', XML::RSS does not know how to process its elements. So it does next best thing -- converts them to strings and tries to build hierachy based on the provided datastructure.

So when you are supplying array reference as in:

... -> label => ['Foo', 'Bar'] ...

In your example it converts array ref to string, and thus "ARRAY(0x#####)" thingy.

As I read documentation from XML::RSS module, it says that the only supported namespaces out-of-the-box are: Dublin Core (http://purl.org/rss/1.0/modules/dc/), Syndication (http://purl.org/rss/1.0/modules/syndication/), and Taxonomy (http://purl.org/rss/1.0/modules/taxonomy/)

By reading further, we see that

XML::RSS also has support for "non-standard" RSS 1.0 modularization at the channel, image, item, and textinput levels. Parsing an RSS document grabs any elements of other namespaces which might appear. XML::RSS also allows the inclusion of arbitrary namespaces and associated elements when building RSS documents. For example, to add elements of a made-up "My" module, first declare the namespace by associating a prefix with a URI:
$rss->add_module(prefix=>'my', uri=>'http://purl.org/my/rss/module/');
Then proceed as usual:
$rss->add_item (title=>$title, link=>$link, my=>{ rating=>$rating });
Check module's POD for more information.

Keep in mind that the sited documentation referes to XML::RSS version 1.10.

Hope this helps.

BR


In reply to Re: XML::RSS, Google Base, and multiple entries by caelifer
in thread XML::RSS, Google Base, and multiple entries by minter

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.