Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Extract a specific number from an XML file based on the start and end tags Post 302357929 by sushant172 on Thursday 1st of October 2009 02:48:22 AM
Old 10-01-2009
Thanks a ton Sir.
 

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

extract a number within an xml file

Hi Everyone, I have an sh script that I am working on and I have run into a little snag that I am hoping someone here can assist me with. I am using wget to retrieve an xml file from thetvdb.com. This part works ok but what I need to be able to do is extract the series ID # from the xml and put... (10 Replies)
Discussion started by: tret
10 Replies

3. Shell Programming and Scripting

remove XML parent start and end tags in same file

Hi All, Requirement: remove start and end tag of parent element <DummyLevel> <level1> </level1> <level2> </level2> <level3> </level3> <level4> </level4> <level5> </level5> <level6> </level7> </DummyLevel> I have to delete the first <dummylevel> and last </DummyLevel> tags from... (7 Replies)
Discussion started by: dstage2006
7 Replies

4. Shell Programming and Scripting

Using SED/AWK to extract xml at end of file

Hello everyone, Firstly i do not require alot of help.. i am right at the end of finishing my scipt but cannot find a solution to the last part. What i need to do is, prompt the user for a file to work with, which i have done. promt the user for an output file - which is done. #!/bin/bash... (14 Replies)
Discussion started by: hugh86
14 Replies

5. Shell Programming and Scripting

The difference between end number in the early row and the start number in the next

Hi Power User, I'm trying to compute this kind of text file format: file1: jakarta 100 150 jakarta 170 210 beijing 220 250 beijing 260 280 beijing 290 320 new_york 330 350 new_york 370 420 tokyo 430 470 tokyo 480 ... (2 Replies)
Discussion started by: anjas
2 Replies

6. UNIX for Dummies Questions & Answers

extract regions of file based on start and end position

Hi, I have a file1 of many long sequences, each preceded by a unique header line. file2 is 3-columns list: headers name, start position, end position. I'd like to extract the sequence region of file1 specified in file2. Based on a post elsewhere, I found the code: awk... (2 Replies)
Discussion started by: pathunkathunk
2 Replies

7. Shell Programming and Scripting

How to extract start/end times from log file to CSV file?

Hi, I have a log file (log.txt) that which contains lines of date/time. I need to create a script to extract a CSV file (out.csv) that gets all the sequential times (with only 1 minute difference) together by stating the start time and end time of this period. Sample log file (log.txt) ... (7 Replies)
Discussion started by: Mr.Zizo
7 Replies

8. Shell Programming and Scripting

Extract specific lines based on another file

I have a folder containing text files. I need to extract specific lines from the files of this folder based on another file input.txt. How can I do this with awk/sed? file1 ARG 81.9 8 81.9 0 LEU 27.1 9 27.1 0 PHE .0 10 .0 0 ASP 59.8 11 59.8 0 ASN 27.6 12 27.6 0 ALA .0 13 .0 0... (5 Replies)
Discussion started by: alanmathew84
5 Replies

9. Shell Programming and Scripting

Extract the specific tags in a XML file

Hello Shell Gurus, I have a requirement to get the specific tags from a XML file. Here is my code snippet <jdbc-system-resource> <name>SDPData Source</name> <target>AdminServer,osb_server1,soa_server1</target> ... (30 Replies)
Discussion started by: Siv51427882
30 Replies

10. UNIX for Beginners Questions & Answers

Splitting week start date and end date based on custom period start dates

Below are my custom period start and end dates based on a calender, these dates are placed in a file, for each period i need to split into three weeks for each period row, example is given below. Could you please help out to achieve solution through shell script.. File content: ... (2 Replies)
Discussion started by: nani2019
2 Replies
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)
All times are GMT -4. The time now is 01:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy