Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: XML::Generator and namespace

by influx (Beadle)
on Aug 10, 2012 at 12:26 UTC ( #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 => " +dtd"], ); print $gen->xmldecl('standalone' , undef); print get_ns($gen->rss([itunes => " +1.0.dtd"], {version => '2.0'})) . "\n";

Comment on Re: XML::Generator and namespace
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (20)
As of 2015-08-28 15:06 GMT
Find Nodes?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...

    Results (337 votes), past polls