Parse an XML task list to create each task.xml file
I have an task definition listing xml file that contains a list of tasks such as
I need to parse the task list into seperate task xml files starting from the <TASK tag to the /TASK> tag using the TASK id for the *.xml name.
I have written a grep command to capture all id names and then a sed command along with another grep command to clean up everything except the id leaving me with a list of just Task id names. My code is not eloquant, but works.
Now I am stuck. Please help. I am a novice at Unix scripting.
Last edited by bakunin; 11-08-2008 at 06:29 PM..
Reason: Please use code-tags areoun code!
I need to know the way. I have got parsing down some nodes. But I was unable to get the child node perfectly. If you have code please send it. It will be very useful for me. (0 Replies)
I have a file contains
TASK gsnmpproxy {
CommandLine = $SMCHOME/bin/gsnmpProxy.exe
}
TASK gsnmpdbgui {
CommandLine = $SMCHOME/bin/gsnmpdbgui.exe
I would like to comment and than uncomment specific task eg TASK gsnmpproxy
Pls suggest how to do in shell script (9 Replies)
How can I parse file containing xml ?
I am sure that its best to use perl - but my perl is not very good - can someone help?
Example below contents of file containing the xml - I basically want to parse the file and have each field contained in a variable..
ie. I want to store the account... (14 Replies)
Hello all,
Given the following extract from a xml file with multiple <JOB> .... </JOB> entries
<JOB
APPLICATION="APP"
APR="0"
AUG="0"
AUTHOR="AUT"
AUTOARCH="0"
CMDLINE="/tmp/test1 %%var"
CONFIRM="1"
CREATION_DATE="20100430"
CREATION_TIME="130739"
... (2 Replies)
I need to create a xml file(master.xml) with contents from another xml files(children). I have below list of xml files in a temporary location (C:/temp/xmls)
1. child1.xml
2. child2.xml
Below is the content of the child1.xml & child2.xml files,
child1.xml
<root>
<emp>
... (3 Replies)
I have more than 10K songs in two directories on a hard drive. I would like to create a file list all of files name then change to .xml extension to upload to iPhone so I have a Karaoke list on my iPhone.
I need your help to create a file by using command in Linux.
Files names:
0001 More... (4 Replies)
Hello everybody,
I have a double mission with some XML files, which is pretty challenging for my actual beginner UNIX knowledge. I need to extract some strings from multiple XML files and create a new XML file with the searched strings..
The original XML files contain the source code for... (12 Replies)
Actually I have one list of channels names like:
Rai 1
Rai 1 +1HD
Rai 1 +2HD
Rai 2
Rai 2 +1HD
Rai 2 +2HD
.
.
.
.From this list of names I need create one new xml file with this structure
<channel id="Rai 1">
<display-name lang="it">Rai 1</display-name>
<icon... (3 Replies)
//file begin =====
//some code
task abcd_;
input x;
input y,z; //some comment
output w; //some comment
reg p;
integer q;
begin
//some code
end
endtask : abcd_
//some code
//file end =====
expected output from above... (1 Reply)
Discussion started by: rishifrnds
1 Replies
LEARN ABOUT DEBIAN
padre::task::eval
Padre::Task::Eval(3pm) User Contributed Perl Documentation Padre::Task::Eval(3pm)NAME
Padre::Task::Eval - Task for executing arbitrary code via a string eval
SYNOPSIS
my $task = Padre::Task::Eval->new(
prepare => '1 + 1',
run => 'my $foo = sub { 2 + 3 }; $foo->();',
finish => '$_[0]->{prepare}',
);
$task->prepare;
$task->run;
$task->finish;
DESCRIPTION
Padre::Task::Eval is a stub class used to implement testing and other miscellaneous functionality.
It takes three named string parameters matching each of the three execution phases. When each phase of the task is run, the string will be
eval'ed and the result will be stored in the same has key as the source string.
If the key does not exist at all, nothing will be executed for that phase.
Regardless of the execution result (or the non-execution of the phase) each phase will always return true. However, if the string eval
throws an exception it will escape the task object (although when run properly inside of a task handle it should be caught by the handle).
METHODS
This class contains now additional methods beyond the defaults provided by the Padre::Task API.
COPYRIGHT & LICENSE
Copyright 2008-2012 The Padre development team as listed in Padre.pm.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl v5.14.2 2012-06-27 Padre::Task::Eval(3pm)