Sponsored Content
Top Forums UNIX for Advanced & Expert Users extracting the component names from SVN changes xml file Post 302417579 by geervani on Friday 30th of April 2010 05:17:02 AM
Old 04-30-2010
extracting the component names from SVN changes xml file

Hi All,

The following is the sample xml which is generated by a tool called HUDSON when ever change occurs in SVN(Sub version namespace).

In the given XML , path/paths tags ll be vary depends on no.of changes.

now , my requirement is, need a script which can extract the payment and balance names out of this xml which is located in side the hudson home directory and the same needs to be update in another file.

This xml ll be in one location.
Code:
<?xml version="1.0" encoding="UTF-8" ?> 
- <log>
- <logentry revision="2087">
<author>antony@gmail.com</author> 
<date>2010-04-30T08:41:11.083067Z</date> 
- <paths>
<path action="D">/trunk/sample/payment/build.properties</path> 
</paths>
<msg /> 
</logentry>
- <logentry revision="2088">
<author>antony@gmail.com</author> 
<date>2010-04-30T08:41:48.057671Z</date> 
- <paths>
<path action="A">/trunk/sample/payment/build.properties</path> 
</paths>
<msg /> 
</logentry>
- <logentry revision="2089">
<author>antony@gmail.com</author> 
<date>2010-04-30T08:42:04.911227Z</date> 
- <paths>
<path action="D">/trunk/sample/balance/build.properties</path> 
</paths>
<msg /> 
</logentry>
- <logentry revision="2090">
<author>antony@gmail.com</author> 
<date>2010-04-30T08:42:30.863455Z</date> 
- <paths>
<path action="A">/trunk/sample/balance/build.properties</path> 
</paths>
<msg /> 
</logentry>
</log>

actually am not sure like how to read an xml file to get a value of a perticular tag using shell script. so,Please if any one can help me out on the same.

thanks in advance

Last edited by geervani; 05-03-2010 at 02:56 AM.. Reason: use code tags please, ty
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

extracting XML file using sed

Hello folks I want to extract data between certain tag in XML file using 'sed' <xml> ......... .......... <one>XXXXXXXXXXXXXXXXXXXX</one> ...... Anyone ?Thank you (7 Replies)
Discussion started by: pujansrt
7 Replies

2. Shell Programming and Scripting

extracting domain names out of a text file

I am needing to extract and list domain names out of a very large text file. The text file contains tlds .com .net .org and others as well as third level domains e.g. host1.domain.com and the names are placed within paragraphs of text. Domains do not have a http:// prefix so I'm thinking the... (6 Replies)
Discussion started by: totus
6 Replies

3. UNIX for Dummies Questions & Answers

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. (1 Reply)
Discussion started by: sushant172
1 Replies

4. UNIX for Dummies Questions & Answers

Extracting data from an xml file

Hello, Please can someone assist. I have the following xml file: <?xml version="1.0" encoding="utf-8" ?> - <PUTTRIGGER xmlns:xsd="http://www.test.org/2001/XMLSchema" xmlns:xsi="http://www.test.org/2001/XMLSchema-instance" APPLICATIONNUMBER="0501160" ACCOUNTNAME="Mrs S Test"... (15 Replies)
Discussion started by: Dolph
15 Replies

5. Shell Programming and Scripting

Need help in extracting data from xml file

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

Extracting content from xml file

Hello All, Hope you are doing well!!!!! I have a small code in the below format in xml file: <UML:ModelElement.taggedValue> <UML:TaggedValue tag="documentation" value="This sequence&#xA;&#xA;HLD_EA_0001X&#xA;HLD_DOORS_002X"/> <UML:TaggedValue tag="documentation" value="This... (11 Replies)
Discussion started by: suvendu4urs
11 Replies

7. Shell Programming and Scripting

Reading XML file and extracting value

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

8. Shell Programming and Scripting

Need Help in extracting data from XML File

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

9. Shell Programming and Scripting

Making post down hook script for svn regarding sending emails after an file is committed in svn

Hi Folks , I am asking this question but i apologise please if this is not the correct forum , I have to develop a shell script that i want to place in at hooks/post-commit , that is basically i have to develop a post hook script and the main functionality of that script would be lets say if... (0 Replies)
Discussion started by: sunsun06060606
0 Replies

10. Shell Programming and Scripting

Create one xml file from one list of names

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)
Discussion started by: Tapiocapioca
3 Replies
SVN-AUTORELEASEDEB.CONF(5)				User Contributed Perl Documentation				SVN-AUTORELEASEDEB.CONF(5)

NAME
svn-autoreleasedeb.conf - Configuration for svn-autoreleasedeb SYNOPSIS
/etc/svn-autoreleasedeb.conf $HOME/.svn-autoreleasedeb/conf DESCRIPTION
The svn-autoreleasedeb configuration file is writed in XML, because XML is easy to work with multiple-level data, but it's already in the TODO list to use a better format. As a good XML file, this config file has the following header. <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE svn-autoreleasedeb [ <!ELEMENT sources (server)+> <!ELEMENT server (package)+> <!ATTLIST server name CDATA #REQUIRED options CDATA #REQUIRED> <!ELEMENT package (option)+> <!ATTLIST package name CDATA #REQUIRED svnserver CDATA #REQUIRED prefix CDATA #REQUIRED tag CDATA #REQUIRED> <!ELEMENT option EMPTY> <!ATTLIST option name CDATA #REQUIRED value CDATA #REQUIRED> ]> Which, in fact, tells the structure of the XML file. But in the case you don't know XML, this header tells that, in the sources, you have servers, which have packages, which have options. A server has the "name" and the "option" properies, a package has "name", "svnserver", "prefix" and "tag" properties and an option has "name" and "value" property. Before explaining how the options affects the script, you must know that in the current version, all the tags and properties MUST be lower- case (it's already on the TODO list). CONFIGURATION SECTIONS
server This is the master section, tells what server to dupload. Actually, the "name" property of the server is used as the "--to" parameter to dupload. Packages are declared inside servers. Also, the "options" property tells aditional parameters to svn-buildpackage for every pack- age in this server. package The package itself, the "name" property is used as the module name for svn checkout. The "svnserver" property is passed to svn and the "prefix" is placed before the module name, used if your package is inside some other directory than the svn root. You must inform the tag to checkout the sources from. This tag should be used to point where to get the release from. "stable" is a good name for a tag. option Specify an option to a package. The following options are accepted and increment the following text to the svn-buildpackage command: binary-source = 1: "-b" EXAMPLE
In the case you still didn't understand the config file, follows an example: <server name="intern"> <package name="svn-autoreleasedeb" svnserver="svn://ruoso@ozonio:/var/svn" prefix="" tag="trunk"> </package> <package name="someotherpackage" svnserver="svn://ruoso@ozonio:/var/svn" prefix="" tag="trunk"> <option name="binary-source" value="1"/> </package> </server> SEE ALSO
svn-buildpackage(1), svn(1), svn-autoreleasedeb(1), dupload(1) AUTHOR
This manual page was written by Daniel Ruoso <daniel@ruoso.com>, for the Debian GNU/Linux system. perl v5.8.7 2006-08-04 SVN-AUTORELEASEDEB.CONF(5)
All times are GMT -4. The time now is 12:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy