Sponsored Content
Top Forums Shell Programming and Scripting sed or awk to extract data from Xml file Post 302296958 by yeclota on Thursday 12th of March 2009 08:08:28 AM
Old 03-12-2009
sed or awk to extract data from Xml file

Hi, I want to get data from Xml file by using sed or awk command. I want to get the following result :

mon titre 1;Createur1;Dossier1
mon titre 1;Createur1;Dossier1

and save it in cvs file (fichier.cvs).

FROM this Xml file (test.xml):

<playlist version="1">

<trackList>

<track>

<title>Mon titre 1</title>

<creator>Createur1</creator>

<location>Dossier1</location>

</track>

<track>

<title>Mon titre 2</title>

<creator>Createur2</creator>

<location>Dossier2</location>

</track>

</trackList>

</playlist>
thanks for your help !
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

extract data from xml- shell script using awk

Hi, This is the xml file that i have. - <front-servlet platform="WAS4.0" request-retriever="SiteMinder-aware" configuration-rescan-interval="60000"> <concurrency-throttle maximum-concurrency="50" redirect-page="/jsp/defaulterror.jsp" /> - <loggers> <instrumentation... (5 Replies)
Discussion started by: nishana
5 Replies

2. Shell Programming and Scripting

extract specific data from xml format file.

Hi, I need to extract the start time value (bold, red font) under the '<LogEvent ID="Timer Start">' tag (black bold) from a file with the following pattern. There are other LogEventIDs listed in the file as well, making it harder for me to extract out the specific start time that I need. . .... (7 Replies)
Discussion started by: 60doses
7 Replies

3. Shell Programming and Scripting

Help with shell script to extract data from XML file

Hello Scripting Gurus, I need help with extracting data from the XML file using shell script. The data is in a large XML and I need to extract the id values of all completedworkflows. Here is a sample of it. Input and output data is also in the attached text files. <wfregistry>... (5 Replies)
Discussion started by: yajaykumar
5 Replies

4. Shell Programming and Scripting

Data Extract from XML Log File

Please help me out to extract the Data from the XML Log files. So here is the data ERROR|2010-08-26 00:05:52,958|SERIAL_ID=128279996|ST=2010-08-2600:05:52|DEVICE=113.2.21.12:601|TYPE=TransactionLog... (9 Replies)
Discussion started by: raghunsi
9 Replies

5. Shell Programming and Scripting

Using SED/AWK to extract xml at end of file

Hello everyone, Firstly i do not require alot of help.. i am right at the end of finishing my scipt but cannot find a solution to the last part. What i need to do is, prompt the user for a file to work with, which i have done. promt the user for an output file - which is done. #!/bin/bash... (14 Replies)
Discussion started by: hugh86
14 Replies

6. Shell Programming and Scripting

sed - extract text from xml file

hi, please help, i have an xml file, e.g: ... <tag> test text asdas="${abc}" xvxvbs:asdas${222}sdad asasa="${aa_bb_22}" </tag> ... i want to extract all "${...}", e.g: ${abc} ${222} ${aa_bb_22} thank you. (2 Replies)
Discussion started by: gioni
2 Replies

7. Shell Programming and Scripting

Extract data from XML file

Hi , I have input file as XML. following are input data #complex.xml <?xml version="1.0" encoding="UTF-8"?> <TEST_doc xmlns="http://www.w3.org/2001/XMLSchema-instance"> <ENTRY uid="123456"> <protein> <name>PROT001</name> <organism>Human</organism> ... (1 Reply)
Discussion started by: mohan sharma
1 Replies

8. Shell Programming and Scripting

How to extract data from xml file using shell scripting?

Hi evry1, This is my 1st post in this forum.Pls help me I want to extract some data froma xml file which has 2000 lines using shell scripting. Actually my xml file has some "audio and video codes" which i need to arrange in a column wise format after extracting it using shell scripting.I... (4 Replies)
Discussion started by: arun_kohan
4 Replies

9. Shell Programming and Scripting

How to extract data from XML file using shell scripting?

Hi , I have input file as XML. following are input data #complex.xml Code: <?xml version="1.0" encoding="UTF-8"?><TEST_doc xmlns="http://www.w3.org/2001/XMLSchema-instance"> <ENTRY uid="123456"> <protein> <name>PROT001</name> <organism>Human</organism> ... (1 Reply)
Discussion started by: arun_kohan
1 Replies

10. Shell Programming and Scripting

Extract Data from XML file.

Hi Guys, I am in a need to extract data from a xml file. The XML file format is as below. <data jsxnamespace="propsbundle" locales=""> <locale> <!--Error messages starts--> <record jsxid="CHARPAIR001" jsxtext=" must be selected"></record> <record... (1 Reply)
Discussion started by: Showdown
1 Replies
Locale::Po4a::Dia(3)					User Contributed Perl Documentation				      Locale::Po4a::Dia(3)

NAME
Locale::Po4a::Dia - convert uncompressed Dia diagrams from/to PO files DESCRIPTION
The po4a (PO for anything) project goal is to ease translations (and more interestingly, the maintenance of translations) using gettext tools on areas where they were not expected like documentation. Locale::Po4a::Dia is a module to help the translation of diagrams in the uncompressed Dia format into other [human] languages. You can get Dia (the graphical editor for these diagrams) from: http://www.gnome.org/projects/dia/ TRANSLATING WITH PO4A::DIA This module only translates uncompressed Dia diagrams. You can save your uncompressed diagrams with Dia itself, unchecking the "Compress diagram files" at the "Save Diagram" dialog. Another way is to uncompress the dia files from command line with: gunzip < original.dia > uncompressed.dia STATUS OF THIS MODULE
This module is fully functional, as it relies in the Locale::Po4a::Xml module. This only defines the translatable tags (<dia:string>), and filters the internal strings (the content of the <dia:diagramdata> tag), not interesting for translation. SEE ALSO
Locale::Po4a::TransTractor(3pm), Locale::Po4a::Xml(3pm), po4a(7) AUTHORS
Jordi Vilalta <jvprat@gmail.com> COPYRIGHT AND LICENSE
Copyright (c) 2004 by Jordi Vilalta <jvprat@gmail.com> This program is free software; you may redistribute it and/or modify it under the terms of GPL (see the COPYING file). perl v5.14.2 2012-05-17 Locale::Po4a::Dia(3)
All times are GMT -4. The time now is 06:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy