09-30-2009
Extracting values from an XML file
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.
Last edited by sushant172; 09-30-2009 at 03:47 AM..
Reason: Incomplete information.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ppl out there...
Can anyone help me with the shell script to extract data from an xml file.
My xml file looks like :
- <servlet>
<servlet-name>FrontServlet</servlet-name>
<display-name>FrontServlet</display-name>
... (3 Replies)
Discussion started by: nishana
3 Replies
2. Shell Programming and Scripting
Hi All,
I'm trying to extract the values for the 'src' and 'alt' tags within an xml file. In the files that I'm searching, the tags are always enclosed within an 'img' tag. Typically:
<img src="diwiz01.gif" width="576" height="254" alt="Out-of-process and In-process COM Objects"><bookmark... (3 Replies)
Discussion started by: Steve_altius
3 Replies
3. Shell Programming and Scripting
Hi Guys,
I have a very large XML feed (2.7 MB) which crashes the server at the time of parsing. Now to reduce the load on the server I have a cron job running every 5 min.'s. This job will get the file from the feed host and keep it in the local machine.
This does not solve the problem as... (9 Replies)
Discussion started by: shridhard
9 Replies
4. Programming
i have an input file of XML type with data like
<nx-charging:additional-parameter name="NX_INTERNATIONALIZED_CLID" value="919427960829"/><nx-charging:finalStatus>RESPONSE , Not/Applicable , OK</nx-charging:finalStatus></nx-charging:process>
i want to extract data such that i get the output... (3 Replies)
Discussion started by: junaid.nehvi
3 Replies
5. Shell Programming and Scripting
Hello,
This is my first post in here, so excuse me if I sound too noob here!
I need to extract the path "/apps/mp/installedApps/V61/HRO/hrms_01698_A_qa.ear" from the below xml extract. The path will always appear with the key "binariesURL"
<deployedObject... (6 Replies)
Discussion started by: abhishek2386
6 Replies
6. Shell Programming and Scripting
Dear All,
I am reading one XML file to extract value from the particular tag:-
Sample xml is below:-
<KeyValuePairs>
<Key>TestString</Key>
<Value>Test12_Pollings</Value>
</KeyValuePairs>
I want to read the value for the KEY tag and there will be multiple key tags :-
awk... (4 Replies)
Discussion started by: sharsour
4 Replies
7. 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
8. Shell Programming and Scripting
Hi,
My requirement is something like this,
I have a xml file that contains some tags and nested tags,
<n:tag_name1>
<n:sub_tag1>val1</n:sub_tag1>
<n:sub_tag2>val2</n:sub_tag2>
</n:tag_name1>
<n:tag_name2>
<n:sub_tag1>value</n:sub_tag1>
... (6 Replies)
Discussion started by: Little
6 Replies
9. Shell Programming and Scripting
Hi All
My input file is an XML and it has some tags and data rows at end.
Starting of data rows is <rs:data> and ending of data rows is </rs:data>.
Within sample data rows (2 rows) shown below, I want to extract data value after equal to sign (until space or "/" sign).
So if XML data... (7 Replies)
Discussion started by: vx04
7 Replies
10. Shell Programming and Scripting
Hi,
I have two files with values in both.
File1:
cat 2 3
dog 4 5
elephant 6 7
camel 2 3
File2:
----+--gkf;ajf=
---+----
+----- cat -------=----+ 3 | 4 ----- dog ------++-- 5 | 9 ----++-- elephant |
5 | 7
---++ camel ------ ++++_---- || 8 | 9
I want the final file as:
cat 4... (1 Reply)
Discussion started by: npatwardhan
1 Replies
LEARN ABOUT OSX
cups-genppdupdate
CUPS-GENPPDUPDATE(8) Gutenprint Manual Pages CUPS-GENPPDUPDATE(8)
NAME
cups-genppdupdate - update Gutenprint PPD files
SYNOPSIS
cups-genppdupdate [-h] [-n] [-N] [-q | -v] [-s ppd-directory] [-s output-directory] [PPD-FILES or QUEUES...]
DESCRIPTION
cups-genppdupdate regenerates the Gutenprint PPD files in use by CUPS, using the PPD files under /usr/share/cups/model/gutenprint as tem-
plates. The new PPD file replaces the old PPD file under /private/etc/cups/ppd, but all the options set in the old PPD will be merged into
the new PPD, provided that they are still valid in the new file.
If no files or queue names are specified, cups-genppdupdate updates all Gutenprint PPD files in /private/etc/cups/ppd. Otherwise,
cups-genppdupdate updates all files or queues listed on the command line.
cups-genppdupdate does not update Foomatic PPD files or PPD files from Gimp-Print 4.2 or earlier.
cups-genppdupdate does not restart cupsd. cupsd will need manually reloading (or send SIGHUP) once cups-genppdupdate has completed.
OPTIONS
-h Show a help message.
-n No action. The program will run, but the old PPD files will not be replaced.
-q Quiet mode. No messages will be issued, apart from errors.
-v Verbose mode. More informative messages will be issued. Note that extremely verbose output may be turned on by setting $debug=1 in
the source, but this output will not be of use to the average user.
-s ppd-directory
Use ppd-directory as the base directory to read PPD files from. By default, the base directory is /usr/share/cups/model/gutenprint.
Under this directory, the PPD files are located in subdirectories according to language code and territory.
-o output-directory
Place updated PPD files in output-directory. By default, this is the same as the input directory.
-N Reset all options to their defaults (do not merge options from the current PPD file)
SEE ALSO
cups-genppd(8), cups-genppdconfig(8), CUPS Software Administrators Manual, http://localhost:631/documentation.html
COPYRIGHT
Copyright (C) 2002-2006 Roger Leigh (rleigh@debian.org) and Robert Krawitz (rlk@alum.mit.edu)
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This manual page was written by Roger Leigh (rleigh@debian.org).
Version 5.2.3 21 Dec 2008 CUPS-GENPPDUPDATE(8)