This is because XML::Simple by default cut the root node, since on XML we only have one root tag. Also you typed _CITY, upercase, that is different of _City, since XML is case sensitive. So, you actually should use:
print $xml->{_City} ;
If you use XML::Smart it has an option to load a XML and parse all the nodes and attributes in upercase or lowercase:
use XML::Smart ;
my $xml = XML::Smart->new(q`<USER _City="testboro"></USER>` , uperta
+g=>1 , uperarg=>1);
print $xml->dump_tree_ok ;
Output:
$VAR1 = {
'USER' => {
'_CITY' => 'testboro'
}
};
Graciliano M. P.
"Creativity is the expression of the liberty".