You could write a simple awk programme to extract the bits you need.
It makes a few assumptions about your code (and that you have GNU awk) which might be wrong, but it works on the small sample you posted and thus might work across all of your input.
Hi
I am new to this forum.
I have few XML files and from each xml file I want to copy some specific 50 no of lines and copy them to some other file.
how to do that? pls help.. (5 Replies)
Hi,
There's an xml file produced from a front-end tool as shown below:
<INPUT DATABASE ="ORACLE" DBNAME ="UNIX" NAME ="FACT_TABLE" OWNERNAME ="DIPS">
<INPUTFIELD DATATYPE ="double" DEFAULTVALUE ="" DESCRIPTION ="" NAME ="STORE_KEY" PICTURETEXT ="" PORTTYPE ="INPUT" PRECISION ="15" SCALE... (6 Replies)
hi,
i need my bash script to find regex in xml file.. and comment 2 lines before and after the line that contains regex.. can't use # needs to be <!-- at the beginning and --> and the end of the comment.
so eg..
first block
<filter>
<filter-name>MyRegEx</filter-name>
... (11 Replies)
I tried searching the forums, but couldn't find anything relevant to my question.
I have an xml file like the following:
<topLevel numberBlock="BLOCK1">
<item="content1" title="Content 1">
<RefPath="path/to/file1.txt />
</item>
<item"content2" title="Content 2" >... (4 Replies)
Hi All,
I need to umcomment an XML block (if it's not already uncommented) in a shell script. There are several commented blocks in the file that need to remain commented out. The challenging part for me is that I need to match a comment on one line and an XML tag on the following line. Also,... (0 Replies)
I want to process a file block by block using sed, and if that block does not contain two patterns, then that complete block has to be printed.
See below for the example data.
................................server 1...............................
running process 1
running... (8 Replies)
I want to comment a block of code in xml. Note that the tags will be similar. In the below xml code, I want to block the listener block for com.pkg1.class2. How do i do it ?
Thanks in Advance
<listener>
<listener-class>com.pkg1.class1</listener-class>
</listener>
.........
<listener>... (4 Replies)
Hi everyone,
So i'm struggling with an xml (log file) where we get information about some devices, so the logfile is filled with multiple "blocks" like that.
Based on the <devId> i want to extract this part of the xml file. If possible I want it to have an script for this, cause we'll use... (5 Replies)
Discussion started by: Pouky
5 Replies
LEARN ABOUT DEBIAN
tv_extractinfo_en
TV_EXTRACTINFO_EN(1p) User Contributed Perl Documentation TV_EXTRACTINFO_EN(1p)NAME
tv_extractinfo_en - read English-language listings and extract info from programme descriptions.
SYNOPSIS
tv_extractinfo_en [--help] [--output FILE] [FILE...]
DESCRIPTION
Read XMLTV data and attempt to extract information from English-language programme descriptions, putting it into machine-readable form.
For example the human-readable text '(repeat)' in a programme description might be replaced by the XML element <previously-shown>.
--output FILE write to FILE rather than standard output
This tool also attempts to split multipart programmes into their constituents, by looking for a description that seems to contain lots of
times and titles. But this depends on the description following one particular style and is useful only for some listings sources
(Ananova).
If some text is marked with the 'lang' attribute as being some language other than English ('en'), it is ignored.
SEE ALSO xmltv(5).
AUTHOR
Ed Avis, ed@membled.com
BUGS
Trying to parse human-readable text is always error-prone, more so with the simple regexp-based approach used here. But because TV listing
descriptions usually conform to one of a few set styles, tv_extractinfo_en does reasonably well. It is fairly conservative, trying to
avoid false positives (extracting 'information' which isn't really there) even though this means some false negatives (failing to extract
information and leaving it in the human-readable text).
However, the leftover bits of text after extracting information may not form a meaningful English sentence, or the punctuation may be
wrong.
On the two listings sources currently supported by the XMLTV package, this program does a reasonably good job. But it has not been tested
with every source of anglophone TV listings.
perl v5.14.2 2011-05-07 TV_EXTRACTINFO_EN(1p)