Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

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":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2022-05-16 08:10 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (62 votes). Check out past polls.