Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

So as it says in the docs, you can add namespaces with the add_module method:

$rss->add_module(prefix=>'my', uri=>'' +); $rss->add_item (title=>$title, link=>$link, my=>{ rating=>$rating }) +;
Updated: Meh, didn't see the 1.0-only restriction in reading the module code the first time. My bad. Looks like you could just add it in. It's this section:

# Ad-hoc modules while ( my($url, $prefix) = each %{$self->{modules}} ) { next if $prefix =~ /^(dc|syn|taxo)$/; while ( my($el, $value) = each %{$self->{channel}->{$prefix}} +) { if ( exists( $rdf_resource_fields{ $url } ) and exists( $rdf_resource_fields{ $url }{ $el }) ) { $output .= qq!<$prefix:$el rdf:resource="! . $self->encode($value) . qq!" />\n!; } else { $output .= "<$prefix:$el>". $self->encode($value) ."< +/$prefix:$el>\n"; } } }

BTW, you do realize that XML::RSS uses XML::Parser, which depends upon expat, which is not pure perl?

The intelligent reader will judge for himself. Without examining the facts fully and fairly, there is no way of knowing whether vox populi is really vox dei, or merely vox asinorum. — Cyrus H. Gordon

In reply to Re: XML::RSS and RSS2 with custom namespaces by idsfa
in thread XML::RSS and RSS2 with custom namespaces by BaldPenguin

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others making s'mores by the fire in the courtyard of the Monastery: (6)
    As of 2020-10-20 20:19 GMT
    Find Nodes?
      Voting Booth?
      My favourite web site is:

      Results (210 votes). Check out past polls.