Sponsored Content
Top Forums Shell Programming and Scripting Data Extract from XML Log File Post 302448814 by raghunsi on Friday 27th of August 2010 05:33:57 AM
Old 08-27-2010
Im Using Solaris 10, so shall i use NAWK
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

extract specific data from xml format file.

Hi, I need to extract the start time value (bold, red font) under the '<LogEvent ID="Timer Start">' tag (black bold) from a file with the following pattern. There are other LogEventIDs listed in the file as well, making it harder for me to extract out the specific start time that I need. . .... (7 Replies)
Discussion started by: 60doses
7 Replies

2. Shell Programming and Scripting

Help with shell script to extract data from XML file

Hello Scripting Gurus, I need help with extracting data from the XML file using shell script. The data is in a large XML and I need to extract the id values of all completedworkflows. Here is a sample of it. Input and output data is also in the attached text files. <wfregistry>... (5 Replies)
Discussion started by: yajaykumar
5 Replies

3. Shell Programming and Scripting

sed or awk to extract data from Xml file

Hi, I want to get data from Xml file by using sed or awk command. I want to get the following result : mon titre 1;Createur1;Dossier1 mon titre 1;Createur1;Dossier1 and save it in cvs file (fichier.cvs). FROM this Xml file (test.xml): <playlist version="1"> <trackList> <track>... (1 Reply)
Discussion started by: yeclota
1 Replies

4. Shell Programming and Scripting

Extract data from an XML file & write into a CSV file

Hi All, I am having an XML tag like: <detail sim_ser_no_1="898407109001000090" imsi_1="452070001000090"> <security>ADM1=????</security> <security>PIN1=????</security> <security>PIN2=????</security> ... (2 Replies)
Discussion started by: ss_ss
2 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

Extract data from XML file

Hi , I have input file as XML. following are input data #complex.xml <?xml version="1.0" encoding="UTF-8"?> <TEST_doc xmlns="http://www.w3.org/2001/XMLSchema-instance"> <ENTRY uid="123456"> <protein> <name>PROT001</name> <organism>Human</organism> ... (1 Reply)
Discussion started by: mohan sharma
1 Replies

7. Shell Programming and Scripting

Extract data from XML file and write in CSV file

Hi friend i have input as following XML file <?xml version="1.0"?> <Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.054.001.02"> <BkToCstmrDbtCdtNtfctn> <GrpHdr><MsgId>LBP-RDJ-TE000000-130042430010001001</MsgId><CreDtTm>2013-01-04T03:21:30</CreDtTm></GrpHdr>... (3 Replies)
Discussion started by: mohan sharma
3 Replies

8. Shell Programming and Scripting

How to extract data from xml file using shell scripting?

Hi evry1, This is my 1st post in this forum.Pls help me I want to extract some data froma xml file which has 2000 lines using shell scripting. Actually my xml file has some "audio and video codes" which i need to arrange in a column wise format after extracting it using shell scripting.I... (4 Replies)
Discussion started by: arun_kohan
4 Replies

9. Shell Programming and Scripting

How to extract data from XML file using shell scripting?

Hi , I have input file as XML. following are input data #complex.xml Code: <?xml version="1.0" encoding="UTF-8"?><TEST_doc xmlns="http://www.w3.org/2001/XMLSchema-instance"> <ENTRY uid="123456"> <protein> <name>PROT001</name> <organism>Human</organism> ... (1 Reply)
Discussion started by: arun_kohan
1 Replies

10. Shell Programming and Scripting

Extract Data from XML file.

Hi Guys, I am in a need to extract data from a xml file. The XML file format is as below. <data jsxnamespace="propsbundle" locales=""> <locale> <!--Error messages starts--> <record jsxid="CHARPAIR001" jsxtext=" must be selected"></record> <record... (1 Reply)
Discussion started by: Showdown
1 Replies
Net::Jabber::Log(3)					User Contributed Perl Documentation				       Net::Jabber::Log(3)

NAME
Net::Jabber::Log - Jabber Log Module SYNOPSIS
Net::Jabber::Log is a companion to the Net::Jabber module. It provides the user a simple interface to set and retrieve all parts of a Jabber Log. DESCRIPTION
To initialize the Log with a Jabber <log/> you must pass it the XML::Parser Tree array. For example: my $log = new Net::Jabber::Log(@tree); There has been a change from the old way of handling the callbacks. You no longer have to do the above, a Net::Jabber::Log object is passed to the callback function for the log: use Net::Jabber; sub log { my ($Log) = @_; . . . } You now have access to all of the retrieval functions available. To create a new log to send to the server: use Net::Jabber; $Log = new Net::Jabber::Log(); Now you can call the creation functions below to populate the tag before sending it. For more information about the array format being passed to the CallBack please read the Net::Jabber::Client documentation. Retrieval functions $from = $Log->GetFrom(); $fromJID = $Log->GetFrom("jid"); $type = $Log->GetType(); $data = $Log->GetData(); $str = $Log->GetXML(); @log = $Log->GetTree(); Creation functions $Log->SetLog(type=>"error", from=>"users.jabber.org", data=>"The moon is full... I can't run anymore."); $Log->SetFrom("foo.jabber.org"); $Log->SetType("warn"); $Log->SetData("I can't find a config file. Using defaults."); Test functions $test = $Log->DefinedFrom(); $test = $Log->DefinedType(); METHODS
Retrieval functions GetFrom() - returns either a string with the Jabber Identifier, GetFrom("jid") or a Net::Jabber::JID object for the person who sent the <log/>. To get the JID object set the string to "jid", otherwise leave blank for the text string. GetType() - returns a string with the type <log/> this is. GetData() - returns a string with the cdata of the <log/>. GetXML() - returns the XML string that represents the <log/>. This is used by the Send() function in Client.pm to send this object as a Jabber Log. GetTree() - returns an array that contains the <log/> tag in XML::Parser Tree format. Creation functions SetLog(from=>string|JID, - set multiple fields in the <log/> type=>string, at one time. This is a cumulative data=>string) and over writing action. If you set the "from" attribute twice, the second setting is what is used. If you set the type, and then set the data then both will be in the <log/> tag. For valid settings read the specific Set functions below. SetFrom(string) - sets the from attribute. You can either pass a string SetFrom(JID) or a JID object. They must be valid Jabber Identifiers or the server will return an error log. (ie. jabber:bob@jabber.org/Silent Bob, etc...) SetType(string) - sets the type attribute. Valid settings are: notice general logging warn warning alert critical error (can still run but not correctly) error fatal error (cannot run anymore) SetData(string) - sets the cdata of the <log/>. Test functions DefinedFrom() - returns 1 if the from attribute is defined in the <log/>, 0 otherwise. DefinedType() - returns 1 if the type attribute is defined in the <log/>, 0 otherwise. AUTHOR
By Ryan Eatmon in May of 2000 for http://jabber.org.. COPYRIGHT
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.1 2004-08-17 Net::Jabber::Log(3)
All times are GMT -4. The time now is 09:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy