Sample Unix script file to convert .xml to .csv


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Sample Unix script file to convert .xml to .csv
# 1  
Old 08-27-2007
Sample Unix script file to convert .xml to .csv

Dear all,

Can you send me a script file the changes .xml to .csv file.

Thanks,
Srinivasa
# 2  
Old 08-27-2007
Provide a sample xml file
# 3  
Old 08-27-2007
This was posted in error. please remove this

Last edited by ahmedwaseem2000; 08-27-2007 at 02:46 PM..
# 4  
Old 08-27-2007
sample xml

Quote:
Originally Posted by jacoden
Provide a sample xml file
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xslSmilieutput method="xml"/>
<ns0:EmployeeAssesmentSFACTOR xmlns:ns0="http://ehro.eds.com/FRAMEWORK/FileToFile">
<ASSESMENT>
<EMPLOYEENO>1</EMPLOYEENO>
<VALID_FROM>12</VALID_FROM>
<VALID_TO>13</VALID_TO>
<EMPLOYEERATING>
<DESCRIPTION>Sri ni</DESCRIPTION>
<RATING>A</RATING>
<COMMENT>good</COMMENT>
</EMPLOYEERATING>
</ASSESMENT>
</ns0:EmployeeAssesmentSFACTOR>
# 5  
Old 08-27-2007
Give us the full structure of the xml file.
Is there allways only one ns0:EmployeeAssesmentSFACTOR tag ?
Is there allways only one ASSESMENT tag inside ns0:EmployeeAssesmentSFACTOR ?
Is there allways only one EMPLOYEERATING tag inside ASSESMENT ?

Show us the required format of the csv file.

Jean-Pierre.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

UNIX/PERL script to convert XML file to pipe delimited format

Hello, I need to get few values from a XML file and output needs to be written in another file with pipe delimited format. The Header & Footer of the Pipe Delimited file will be constant. The below is my sample XML file. I need to pull the values in between the XML tags <Operator_info to... (15 Replies)
Discussion started by: karthi1305561
15 Replies

2. UNIX for Advanced & Expert Users

Convert CSV file to nested XML file using UNIX/PERL?

we have a CSV which i need to convert to XML using Perl or Unix shell scripting. I was able to build this XML in oracle database. However, SQL/XML query is running for long time. Hence, I'm considering to write a Perl or shell script to generate this XML file. Basically need to build this XML... (3 Replies)
Discussion started by: laknar
3 Replies

3. Shell Programming and Scripting

Convert XML to CSV using awk or shell script

Hello, I am working on a part of code where I need a awk or shell script to convert the given XML file to CSV or TXT file. There are multiple xml files and of different structure, so a single script is required for converting data. I did find a lot of solutions in the forum but... (16 Replies)
Discussion started by: Rashmitha
16 Replies

4. Shell Programming and Scripting

How to convert xml to csv ?

I am in need of converting billions of XML into csv file to load data to DB, i have found the below code in perl but not sure why it's not working properly. CODE: #!/usr/bin/perl # Script to illustrate how to parse a simple XML file # and pick out all the values for a specific element, in... (1 Reply)
Discussion started by: rspwilliam
1 Replies

5. Shell Programming and Scripting

Convert XML file to CSV file

Hi Guys, I am new to Shell scripting and need to convert an XML files to a CSV file. My actual problem is that XML file loading is taking hours and I have decided to convert the XML structure to row based data in a CSV file. My XML file: Message846 can repeat within main loop and... (1 Reply)
Discussion started by: qamar.shahbaz
1 Replies

6. Shell Programming and Scripting

convert huge .xml file in .csv with specific column.

I have huge xml file in server and i want to convert it to .csv with specific column ... i have search in blog but i didn't get any usefully command. Thanks in advance (1 Reply)
Discussion started by: pareshkp
1 Replies

7. Shell Programming and Scripting

Convert xml to csv

I need to convert below xml code to csv. I searched other posts as well but this post (_https://www.unix.com/shell-programming-scripting/174417-extract-parse-xml-data-statistic-value-csv.html) gives "sed command garbled" error. As of now I have written a long script to do it, but can it be done with... (7 Replies)
Discussion started by: dineshydv
7 Replies

8. Shell Programming and Scripting

How to convert a excel file to a .csv file from unix script

Hi I have a excel file in unix machine and have to convert it into a .csv file.I have to do this from a unix script.How do we do this? Thanks Abhinav (3 Replies)
Discussion started by: akashtcs
3 Replies

9. UNIX for Dummies Questions & Answers

Unix script to convert .csv file to.xls format

I have a .csv file in Unix box i need a UNIX script to convert the.csv files to.xls format. Its very urgent please help me. (1 Reply)
Discussion started by: moon_friend
1 Replies

10. Shell Programming and Scripting

Help to convert XML to CSV

Apologies if this has already been covered in this site somewhere, I did try looking but without any success. I am new to the whole XML thing, very late starter, and have a requirement to convert an XML fiule to a CSV fomat. I am crrently working on a Solaris OS. Does anyone have any suggestions,... (2 Replies)
Discussion started by: rossingi_33
2 Replies
Login or Register to Ask a Question