Current location: Hot Scripts Forums » Programming Languages » Perl » how to convert log file to xml


how to convert log file to xml

Reply
  #1 (permalink)  
Old 01-24-05, 10:48 AM
perlguru perlguru is offline
New Member
 
Join Date: Jan 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
how to convert log file to xml

i have a big log file and would like to parse it to xml so that the data then can be passed to the database latter on. I am new to perl. please help me
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 01-28-05, 01:12 AM
Chas Chas is offline
Coding Addict
 
Join Date: Oct 2003
Location: California
Posts: 359
Thanks: 0
Thanked 0 Times in 0 Posts
Something like the XML::Simple[1] Perl module would work for this. Though if you're just reformatting it to put it into a DB is there any reason why you can just do that in Perl with DBI[2]? That would save you a step I would think.

~Charlie

[1] http://search.cpan.org/~grantm/XML-S.../XML/Simple.pm
[2] http://search.cpan.org/~timb/DBI/DBI.pm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Search an XML file Bjorn2404 PHP 3 01-18-05 03:49 PM
Perl Script to parse 1 xml file into many flsh Perl 0 08-09-04 11:21 AM
Enter information into fields, creates XML file on the fly ziphem Script Requests 1 04-28-04 07:55 PM
Getting the created file (fopen/fwrite) Programme PHP 5 02-14-04 04:09 PM
Upload file type and size limiter! Arctic ASP 1 08-02-03 08:06 PM


All times are GMT -5. The time now is 06:40 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.