07-07-2016
What operating system and shell are you using?
Do you just want to change <argument name> tag data if the tag appears between <task-arguments> and </task-arguments> tags; or do you want to change them everywhere they appear?
Where do the new values come from? Is there a configuration file? Are they given as command-line arguments? Are they to be hardcoded in your script?
Are only the values shown in the example to be replaced, or are all values found in your input file to be replaced?
What is the name of your XML file? Is the name to be given as a parameter to your script? Is the name to be hard coded into your script?
What have you tried to solve this problem on your own?
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello People,
I have an xml file from which I need to extract the values of the parameters using UNIX shell commands.
Ex : Input is like :
<Name>Roger</Name>
or
<Address>MI</Address>
I need the output as just :
Roger
or
MI
with the tags removed.
Please help. (1 Reply)
Discussion started by: sushant172
1 Replies
2. Shell Programming and Scripting
Hi,
I am new to UNIX and shell scripting.
I have to create a shell script(ksh) which parses log4j.xml file for a given webservice name and change the corresponding value from INFO to DEBUG or vice-versa.
My log4j.xml looks like:-
<!-- Appender WEBSERVICENAME-->
<appender... (3 Replies)
Discussion started by: sanjeevcseng
3 Replies
3. Shell Programming and Scripting
Hello,
I don't have experience in this scripting and I need some help to read a value from an XML file and change it with a random number to use in simulator for different network scenarios.
</Description><sim_comm_rounds>35</sim_comm_rounds><num_clusters>1</num_clusters><Clocking>
I want to... (5 Replies)
Discussion started by: erhanasd
5 Replies
4. Shell Programming and Scripting
Hello I am a noob in XML and Python. I am trying to do this for my MSc project about a network simulation and need some help.... I want to change the values shown below:
<num_crash_failures>1</num_crash_failures>
−<crash_failure_entry>
<freeze_at_slot>0</freeze_at_slot>... (0 Replies)
Discussion started by: erhanasd
0 Replies
5. Shell Programming and Scripting
Hi,
I need to capture all the attributes with delete next to it. The source XML file is attached.
The output should contain something like this below:
Attributes = legacyExchangeDN
Action = Delete
Username = Hero Joker
Loginid = joker09
OU =... (4 Replies)
Discussion started by: prvnrk
4 Replies
6. Shell Programming and Scripting
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
7. UNIX for Dummies Questions & Answers
hi guys, i want help... Reding XML file and print the values into the text file using linux shell script file as per below xml file
<sequence>
<Filename>aldorzum.doc</Filename>
<DivisionCode>US</DivisionCode>
<ContentType>Template</ContentType>
<ProductCode>VIMZIM</ProductCode>
</sequence>... (1 Reply)
Discussion started by: sravanreddy
1 Replies
8. UNIX for Dummies Questions & Answers
hi guys, i want help... Reding XML file and print the values into the text file using linux shell script file as per below xml file
<sequence>
<Filename>aldorzum.doc</Filename>
<DivisionCode>US</DivisionCode>
<ContentType>Template</ContentType>
<ProductCode>VIMZIM</ProductCode>
</sequence>... (4 Replies)
Discussion started by: sravanreddy
4 Replies
9. Shell Programming and Scripting
Dear community,
I have a big XML log file containing several rows splitted by tag: <ActivityLogRecord> and </ActivityLogRecord>. An example below.
What I need is read the file and extract some value from each tags and put them into one line (each line for every <ActivityLogRecord> tag).
So... (5 Replies)
Discussion started by: Lord Spectre
5 Replies
LEARN ABOUT DEBIAN
stag-parse
STAG-PARSE(1p) User Contributed Perl Documentation STAG-PARSE(1p)
NAME
stag-parse - parses a file and fires events (e.g. sxpr to xml)
SYNOPSIS
# convert XML to IText
stag-parse -p xml -w itext file1.xml file2.xml
# use a custom parser/generator and a custom writer/generator
stag-parse -p MyMod::MyParser -w MyMod::MyWriter file.txt
DESCRIPTION
script wrapper for the Data::Stag modules
feeds in files into a parser object that generates nestarray events, and feeds the events into a handler/writer class
ARGUMENTS
-p|parser FORMAT
FORMAT is one of xml, sxpr or itext, or the name of a perl module
this is the class that parsers the input file(s) and generates stag events
xml assumed as default
-w|writer FORMAT
FORMAT is one of xml, sxpr or itext, or the name of a perl module
this is the class that catches the events thrown by the parser; it can be any class, but the class is typically a writer
xml assumed as default
-o|out FILE
the writer will use this file (defaults to STDOUT)
-e|errf FILE
file to store parse error handler output
-errhandler FORMAT/MODULE
FORMAT is one of xml, sxpr or itext, or the name of a perl module
all parse error events go to this module
-r|root NODE_NAME
if this is specified, NODE_NAME becomes the root of the stag tree, and anything that was previously the root is placed below this.
this happens automatically if more than one file is parsed (because there can only be one tree root)
-color
Works only if the output handler is able to provide ASCII-colors (currently supported for itext and xml)
SEE ALSO
Data::Stag
This script is a wrapper for the method
Data::Stag->parse()
perl v5.10.0 2008-12-23 STAG-PARSE(1p)