Hi to all perlmonks users, and thanks all and in particular to whom will waste some minutes with my silly questions

I'm really losing my mind with a file formatted like this:

<?xml version="1.0" encoding="UTF-8"?> <ctgStatistics xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ctgstatslog.xsd"> <statRecord type="interval" length="60" time="2019-07-16T08:23:59"> <resourceGroup name="CSCS1SVGM1"> <statistic type="Startup"> <name>SPROTOCOL</name> <value type="String">TCPIP</value> </statistic> <statistic type="Lifetime"> <name>LCONNFAIL</name> <value type="Integer">0</value> </statistic> <statistic type="Lifetime"> <name>LLOSTCONN</name> <value type="Integer">0</value> </statistic> <statistic type="Lifetime"> <name>LIDLETIMEOUT</name> <value type="Integer">0</value> </statistic> <statistic type="Lifetime"> <name>LALLREQ</name> <value type="Integer">0</value> </statistic> <statistic type="Lifetime"> <name>LREQDATA</name> <value type="Long">0</value> </statistic> <statistic type="Lifetime"> <name>LRESPDATA</name> <value type="Long">0</value> </statistic> <statistic type="Current"> <name>CREQCURR</name> <value type="Integer">0</value> </statistic> <statistic type="Current"> <name>CWAITING</name> <value type="Integer">0</value> </statistic> <statistic type="Current"> <name>CORPHANREQ</name> <value type="Integer">0</value> </statistic> <statistic type="Lifetime"> <name>LORPHANREQ</name> <value type="Integer">0</value> </statistic> <statistic type="Current"> <name>CTERM</name> <value type="Integer">0</value> </statistic> <statistic type="Lifetime"> <name>LTERMINST</name> <value type="Integer">0</value> </statistic> <statistic type="Lifetime"> <name>LTERMUNINST</name> <value type="Integer">0</value> </statistic> <statistic type="Lifetime"> <name>LAVRESP</name> <value type="Integer">0</value> </statistic> <statistic type="Startup"> <name>SIPADDR</name> <value type="String">amlif700txs001</value> </statistic> <statistic type="Startup"> <name>SIPPORT</name> <value type="Integer">28218</value> </statistic> </resourceGroup> <resourceGroup name="CSCS1SVGM1"> ..... <resourceGroup name="ANOTHER_ONE_AND_SO_ON> ... </resourceGroup> </statRecord> </ctgStatistics>>

The data::dumper config is:

$VAR1 = { 'xsi:noNamespaceSchemaLocation' => 'ctgstatslog.xsd', 'statRecord' => [ { 'resourceGroup' => { 'CSCS1GFVM1' => { ' +statistic' => { + 'LRESPDATA' => { + 'value' => { + 'content' => '0', + 'type' => 'Long' + }, + 'type' => 'Lifetime' + }, + 'CREQCURR' => { + 'type' => 'Current', + 'value' => { + 'type' => 'Integer', + 'content' => '0' + } + }, + 'SIPADDR' => { + 'value' => { + 'type' => 'String', + 'content' => 'amlif700txs +001' + }, + 'type' => 'Startup' + }, + 'LLOSTCONN' => { + 'type' => 'Lifetime', + 'value' => { + 'type' => 'Integer', + 'content' => '0' + } + }, + 'CORPHANREQ' => { + 'value' => { + 'content' => '0', + 'type' => 'Integer'

This file contains 24h statistics, and the size is 82Mb (one file each day).
There is a section:

<statRecord type="interval" length="60" time="2019-07-16T08:23:59">
every 60secs.
My needed would be an output, more or less like this:
time|resourceGroup name|LCONNFAIL|LLOSTCONN|LIDLETIMEOUT|SIPADDR|SIPPO +RT 2019-07-16T08:23:59|CSCS1SVGM1|0|0|0|amlif700txs001|28218 ..and..so..on..until.the.on.file.

I've just tried XML::Twig, XML::LibXML and use Data::Dumper with XML::Simple(which is not so simply for me;-) ) with no success :(.
Thanks, again, to anyone who want to show me the right path/way to follow.


In reply to parse XML huge file using cpan modules by nicopelle

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.