Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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 => "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";


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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2014-10-26 03:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (149 votes), past polls