[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Csv2dsml

  • To: "Menzo Windhouwer" <M.A.Windhouwer@c...>
  • Subject: RE: Csv2dsml
  • From: "Brad Tumy" <btumy@a...>
  • Date: Fri, 29 Oct 2004 07:15:18 -0400
  • Cc: <xml-dev@l...>
  • Thread-index: AcS9h7UQuwRlfpTBQraW0mFfeKvf1wAINKUQ
  • Thread-topic: Csv2dsml

brad tumy
Menzo,

I new it had to be out there...Thanks Menzo for the link...really good
article.  

Thanks!
Brad

-----Original Message-----
From: Menzo Windhouwer [mailto:M.A.Windhouwer@c...] 
Sent: Friday, October 29, 2004 3:21 AM
To: Brad Tumy
Cc: xml-dev@l...
Subject: Re:  Csv2dsml


Hi,

a google "I'm feeling lucky" query on "csv sax xml java" will directly 
take you to:

    http://www.onjava.com/pub/a/onjava/excerpt/java_xslt_ch5/?page=6

which describes how to construct a SAX parser which reads in a CSV file,

in this
case the SAX event stream is tied to a XSLT processor which may be what
you want to create the DSML file, but of course you can connect to any
SAX 
content
handler ...

Menzo Windhouwer

Brad Tumy wrote:

>I was asked to write a "script" that would take a csv file as input and

>create a dsml file as output.  We are receiving employee data as csv 
>and importing to an identity management system using DSML.  I finished 
>this last night...pretty small java code...I ended up using 
>StringTokenizer to capture the columns from each row and then 
>constructed the output as a String for each element...and then using 
>File.write.  So I ended up with a write "line" for each XML element.  
>Not too efficient and not scaleable...
>
>I looked at some resources on the web...saw a csv2xml...but it looked 
>like it was taking the column headers from the csv to use as element 
>names...in this particular situation I had specific element names that 
>were different then the column headers.  I also looked at java's SAX 
>and DOM libraries but couldn't quite get a handle on how to leverage 
>these if I wasn't starting with an XML file.
>
>As anyone else been down this road?  What kind of solutions did you end

>up with...also, if anyone knows how to utilize DOM or SAX to create a 
>XML file from another source I would love to learn how to do this.
>
>Thanks!
>Brad
>
>-----------------------------------------------------------------
>The xml-dev list is sponsored by XML.org <http://www.xml.org>, an 
>initiative of OASIS <http://www.oasis-open.org>
>
>The list archives are at http://lists.xml.org/archives/xml-dev/
>
>To subscribe or unsubscribe from this list use the subscription
>manager: <http://www.oasis-open.org/mlmanage/index.php>
>
>  
>


-- 
Menzo Windhouwer, Centre for Mathematics and Computer Science (CWI)
Kruislaan 413, NL 1098 SJ Amsterdam, The Netherlands
url: http://www.cwi.nl/~windhouw/,  e-mail: windhouw@c...


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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