XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
nicola donnellySubject: csv to xml conversion - structure hierarchy xml
Author: nicola donnelly
Date: 20 Feb 2006 11:14 AM
I am using the adapter to convert a csv file to an xml file.
How do you structure the xml document - ie have certain fields sub elements to other fields.

Also is it possible to add new fields that are not in the original csv file?

Postnext
(Deleted User) Subject: csv to xml conversion - structure hierarchy xml
Author: (Deleted User)
Date: 20 Feb 2006 02:33 PM
Hi, Nicola. You should consider using XSLT (or even XQuery) to transform/modify the XML document that results from converting your CSV source file using the Convert to XML module.

Hope this helps.

David Foster
Stylus Studio Team

Postnext
nicola donnellySubject: csv to xml conversion - structure hierarchy xml
Author: nicola donnelly
Date: 23 Feb 2006 11:35 AM
Hi David,

I have created an XSL document to transform my xml document - is there a way to attach this to my xml document within the adapter ie. during the converting process?

Also my csv file is about 4 meg (13000 rows) - it's taking about 30 minutes + for the file to convert to xml - is this normal?

Thanks,
Nicola

Posttop
(Deleted User) Subject: csv to xml conversion - structure hierarchy xml
Author: (Deleted User)
Date: 23 Feb 2006 01:15 PM
Hi, Nicola. Here are two approaches that might help simplify your task:

- Create an XSLT scenario, using the XML document resulting from the conversion from CSV as the source. Once you are satisfied with the output, you can generate Java code from the XSLT and use that Java as part of a conversion application.

- You can execute the XSLT from the command line, as described in the following SSDN forum thread:

http://www.stylusstudio.com/SSDN/default.asp?action=9&fid=23&read=2963

As to your other question: yes, 30+ minutes seems like a long time to convert 4meg of CSV to XML. If you can provide the file, we can take a look. (You can send it to stylus-field-report at progress dot com.) Also, be aware that a 4meg CSV will swell considerably (to over 50meg, perhaps) when converted to XML.

Hope this helps.

David Foster
Stylus Studio Team

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.