in reply to XML to CSV conversion
Hthuse 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>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: XML to CSV conversion
by Jenda (Abbot) on Jan 20, 2014 at 16:57 UTC |