..or you can even choose to use XML::Twig...
use warnings; use strict; use XML::Twig; my $t= XML::Twig->new( pretty_print => 'indented', twig_handlers => { '_all_' => sub {print $_->t +ext,"\n"} }, #or print $_->text," " as ypu prefer ); $/=''; $t->parse(<DATA>); __DATA__ <event rev="1.2"> <date>2014-01-10-07:59:24.439+05:30I-----</date> <outcome status="0">0</outcome> <originator blade="webseald" instance="default"><component rev="1.4">a +uthn</component> <event_id>101</event_id> <action>0</action> <location>PosIntWebSeal1prod</location> </originator> <accessor name=""> <principal auth="IV_LDAP_V3.0" domain="Default">goldytelecom</principa +l> <name_in_rgy>uid=GOLDYTELECOM,cn=external,cn=Users,o=vodafone,c=in</na +me_in_rgy><session_id>05262372-799f-11e3-96d8-00145ee78c6d </session_id><user_location>10.77.50.58</user_location><user_location_ +type>IPV4</user_location_type> </accessor><target resource="7"><object></object></target> <authntype>formsPassword</authntype><data> </data> </event>
Hth
L*

PS now we wait for Jenda's XML::Rules solution.. ;=)
L*
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

In reply to Re: XML to CSV conversion by Discipulus
in thread XML to CSV conversion by tousifp

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.