Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: accessing XML-declarations

by PeterPeiGuo (Hermit)
on Dec 25, 2010 at 04:00 UTC ( [id://879132] : note . print w/replies, xml ) Need Help??


in reply to accessing XML-declarations

Access it through the actualEncoding method() of the document object:

my $doc = $parser->parse_file("test.xml"); print $doc->actualEncoding();

Peter (Guo) Pei