in reply to XML log file to readable format conversion

There should be no need to open a file before reading it in with XMLIn. Just pass the file to XMLIn:
use strict; use warnings; use Data::Dumper; use XML::Simple; my $ref = XMLin('/home/cpos/aznapi_webseald-default.log$xml'); print Dumper $ref;

See also:

UPDATE: Fixed typo in my untested code (remove $xml):

use strict; use warnings; use Data::Dumper; use XML::Simple; my $ref = XMLin('/home/cpos/aznapi_webseald-default.log'); print Dumper $ref;

Replies are listed 'Best First'.
Re^2: XML log file to readable format conversion
by tousifp (Novice) on Jan 15, 2014 at 16:00 UTC

    I am getting following error :

    Only Comments, PIs and whitespace allowed at end of document Ln: 15, Col: 1

      Your input file is not a well-formed XML. It probably contains some additional information after the closing root tag.
      لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

        As it is a log file, it most likely doesn't contain a single root tag (which is something the committeee decided to require). Instead of the file, you thus have to parse an XML document like this:

        <!DOCTYPE doc [<!ENTITY real_doc SYSTEM "$the_file_name">]><doc>&real_ +doc;</doc>

        Jenda
        Enoch was right!
        Enjoy the last years of Rome.

      I had a typo in my untested code example. Refer to my update.