in reply to Re^2: XML::Generator and namespace
in thread XML::Generator and namespace

In your example, you don't want the <rss> tag to be in the itunes: namespace, so you shouldn't be passing in a namespace to the corresponding XML::Generator call. All you need to do to get the xmlns:itunes attribute into the <rss> tag is to use that namespace in some embedded content. For example:
$itunes = XML::Generator->new(namespace=>[itunes=>'http://...']); $gen = XML::Generator->new(); print $gen->rss($itunes->author("Some Guy"))
This generates:
<rss xmlns:itunes="http://..."><itunes:author>Some Guy</itunes></rss>