in reply to Re^2: XML::Twig and #default prefix
in thread XML::Twig and #default prefix

I get the proper result:

/usr/bin/perl use strict; use warnings; use XML::Twig; my $twig = XML::Twig->parse( map_xmlns => { 'http://www.w3.org/2001/XM +LSchema' => 'xsd', }, \*DATA); printf "\$twig->root->gi: %s\n", $twig->root->gi; printf "\$twig->root->namespace: %s\n", $twig->root->namespace; __DATA__ <schema xmlns="http://www.w3.org/2001/XMLSchema"><element name="alert" +/></schema>

gives me:

$twig->root->gi: xsd:schema $twig->root->namespace: http://www.w3.org/2001/XMLSchema

Which version of XML::Twig are you using? I get the results above with XML::Twig 3.32, the latest CPAN release.

Replies are listed 'Best First'.
Re^4: XML::Twig and #default prefix
by DJpumps (Novice) on Dec 12, 2007 at 10:36 UTC
    I got the results with 3.30. I'll try again with 3.32 although it does not seem that you made any changes that should affect this behavior between 3.30 and 3.32.
    -- DJpumps