Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: XML::Generator and namespace

by influx (Beadle)
on Aug 10, 2012 at 12:26 UTC ( [id://986730]=note: print w/replies, xml ) Need Help??


in reply to XML::Generator and namespace

While not the best solution, in the meantime perhaps you could wrap it in a function that returns the information you want

use strict; use XML::Generator; sub get_ns { my $in = shift; my $ns = substr($in, 1, index($in, ":")); $in =~ s/<$ns/</g; return $in; } my $gen = XML::Generator->new( conformance => 'strict', escape => 'always', pretty => 2, encoding => 'UTF-8', version => '1.0', namespace => [itunes => "http://www.itunes.com/dtds/podcast-1.0. +dtd"], ); print $gen->xmldecl('standalone' , undef); print get_ns($gen->rss([itunes => "http://www.itunes.com/dtds/podcast- +1.0.dtd"], {version => '2.0'})) . "\n";

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://986730]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-03-19 05:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found