extracting the component names from SVN changes xml file


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users extracting the component names from SVN changes xml file
# 1  
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
# 2  
Old 05-04-2010
I get no clue by your description. No idea which the balance and payment names are in this excerpt. Best post an example of the wanted output.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
Login or Register to Ask a Question