Coverting a log file into XML


 
Thread Tools Search this Thread
Operating Systems Linux Coverting a log file into XML
# 1  
Old 08-30-2010
Coverting a log file into XML

ID -------CODE-------DATE-------URL


I have a log file with entries like this. The file has about 6 lakhs record and the size is about 42MB. I need to covert them into a XML file like <ID></ID>
<CODE></CODE>
<DATE></DATE>
<URL></URL>

I have done a logic for this and successfully done. But I am unable to do this with that six lakhs record. Any other way of doing this ?? Like using sed or some other..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

NWS CLI data Coverting to .CSV file

Hi everyone, I found this forum through a google search I'm hoping someone can help me. I am so clueless on coding stuff so bare with me. I need to write a script/program to convert the snowfall data to a .CSV file. But I guess it doesn't end there. I'm looking to grab snowfall totals and... (7 Replies)
Discussion started by: Cambium27
7 Replies

2. Shell Programming and Scripting

Comparing delta values of one xml file in other xml file

Hi All, I have two xml files. One is having below input <NameValuePair> <name>Daemon</name> <value>tcp:7474</value> </NameValuePair> <NameValuePair> <name>Network</name> <value></value> </NameValuePair> ... (2 Replies)
Discussion started by: sharsour
2 Replies

3. Shell Programming and Scripting

Help required in Splitting a xml file into multiple and appending it in another .xml file

HI All, I have to split a xml file into multiple xml files and append it in another .xml file. for example below is a sample xml and using shell script i have to split it into three xml files and append all the three xmls in a .xml file. Can some one help plz. eg: <?xml version="1.0"?>... (4 Replies)
Discussion started by: ganesan kulasek
4 Replies

4. Shell Programming and Scripting

How to add the multiple lines of xml tags before a particular xml tag in a file

Hi All, I'm stuck with adding multiple lines(irrespective of line number) to a file before a particular xml tag. Please help me. <A>testing_Location</A> <value>LA</value> <zone>US</zone> <B>Region</B> <value>Russia</value> <zone>Washington</zone> <C>Country</C>... (0 Replies)
Discussion started by: mjavalkar
0 Replies

5. Shell Programming and Scripting

Extract XML message from a log file using awk

Dear all I have a log file and the content like this file name: temp.log <?xml version="1.0" encoding="cp850"?> <!DOCTYPE aaabbb SYSTEM '/dtdpath'> <aaabbb> <tranDtl> <msgId>000001</msgId> </tranDtl> ..... </aaabbb> ... ... (1 Reply)
Discussion started by: on9west
1 Replies

6. Shell Programming and Scripting

getting requestName from xml outout in log file

hi all, i was wondering if there is an easy and smart way of greping for requestname (in bold below) from xml output from application log file on a solaris 10 system. The requestName is the actual method name which gets called e.g it could be 'getAccount' or getId or getAddress etc etc ... (1 Reply)
Discussion started by: cesarNZ
1 Replies

7. Shell Programming and Scripting

Data Extract from XML Log File

Please help me out to extract the Data from the XML Log files. So here is the data ERROR|2010-08-26 00:05:52,958|SERIAL_ID=128279996|ST=2010-08-2600:05:52|DEVICE=113.2.21.12:601|TYPE=TransactionLog... (9 Replies)
Discussion started by: raghunsi
9 Replies

8. Shell Programming and Scripting

How to remove xml namespace from xml file using shell script?

I have an xml file: <AutoData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Table1> <Data1 10 </Data1> <Data2 20 </Data2> <Data3 40 </Data3> <Table1> </AutoData> and I have to remove the portion xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" only. I tried using sed... (10 Replies)
Discussion started by: Gary1978
10 Replies

9. Programming

coverting html data to text in 'c'

hi, iam reading the webpage using curl socket. so iam geting the data in html format so how can convert html data to text data ,so i can move forward. thank u, sree (3 Replies)
Discussion started by: phani_sree
3 Replies

10. UNIX Desktop Questions & Answers

coverting to xbm

Heleuw, I want to convert an image to .xbm the problem is that, wehen I convert it it is only a 2 color image,(black&white), someknowes a tool or an other solution to get the complete image to .xbm with colors and sizes etc:confused: Thnx in advance EJ =) (2 Replies)
Discussion started by: EJ =)
2 Replies
Login or Register to Ask a Question
XML(3pm)						User Contributed Perl Documentation						  XML(3pm)

NAME
CGI::XML - Perl extension for converting CGI.pm variables to/from XML SYNOPSIS
use CGI::XML; $q = new CGI::XML; # convert CGI.pm variables to XML $xml = $q->toXML; $xml = $q->toXML($root); # convert XML to CGI.pm variables $q->toCGI($xml); DESCRIPTION
The CGI::XML module converts CGI.pm variables to XML and vice versa. CGI::XML is a subclass of CGI.pm, so it reads the CGI variables just as CGI.pm would. METHODS
$q = new CGI::XML creates a new instance of CGI::XML. You also have access to all of the methods in CGI.pm. $q->toXML([$root]) where $root is an optional parameter that specifies the root element. By default, toXML will not return a root element. $q->toCGI($xml) where $xml is the XML you would like to convert to CGI.pm parameters. Values in the XML will overwrite any existing values if they exist. NOTE
CGI::XML does not currently handle multiple selections passed from HTML forms. This will be added in a future release. AUTHOR
Jonathan Eisenzopf <eisen@pobox.com> CONTRIBUTORS
David Black <dblack@candle.superlink.net> SEE ALSO
perl(1), XML::Parser(3). perl v5.8.8 2004-12-05 XML(3pm)