RE: [xsl] Creating xml files

Subject: RE: [xsl] Creating xml files
From: David.Pawson@xxxxxxxxxxx
Date: Thu, 24 Jul 2003 08:22:52 +0100
Vanilla CSV can be dealt with as text,
but recursing both over lines then fields might get tricky.
Sorting XML < and & needs attending to also.

Its really messy when you find line breaks in fields,
nested quotes if used to wrap fields, comma's in fields etc,
as excel exports.

Theres a python version to sort it,
http://packages.qa.debian.org/p/python-csv.html
or (my favourite) http://www.object-craft.com.au/projects/csv/

I wanted to make it configurable,
so I took  a config file and did it in java,
http://www.dpawson.co.uk/java/index.html
 I've had one complaint it didn't work, but have used it since
myself without problems.

HTH DaveP


Wendell said
> To create XML from CSV, XSLT 1.0 can even be used, if you're 
> willing to 
> recurse.
> 
> Check out http://exslt.org/str/index.html for a tokenize() extension 
> function, which can be adapted or used out of the box in many 
> processors.
> 
> Or roll your own as an exercise in recursive string 
> processing in XSLT. 
> Jeni Tennison's "XSLT On the Edge" is filled with examples of 
> this sort of 
> thing. (It's also in the list archives and, probably, in the FAQ.)
> 
> Cheers,
> Wendell
> 
> Check out EXSLT.org At 07:47 AM 7/23/2003, you wrote:
> >xslt 2.0 would be another choice....
> >gl, jim fuller
> >
> > > -----Original Message-----
> > > From: Lawrence Mielniczuk [mailto:lwm@xxxxxxxxxxxxxxx]
> > > Sent: 23 July 2003 11:51
> > > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > > Cc: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > > Subject: Re: [xsl] Creating xml files
> > >
> > >
> > > Perl would be an obvious choice.
> > > ---LwM---
> > > >
> > > > Is there software available that will read a csv file 
> and let you
> > > > structure it into an xml file??
> 
> ___&&__&_&___&_&__&&&__&_&__&__&&____&&_&___&__&_&&_____&__&__
> &&_____&_&&_
>      "Thus I make my own use of the telegraph, without consulting
>       the directors, like the sparrows, which I perceive use it
>       extensively for a perch." -- Thoreau
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 

- 

NOTICE: The information contained in this email and any attachments is 
confidential and may be legally privileged. If you are not the 
intended recipient you are hereby notified that you must not use, 
disclose, distribute, copy, print or rely on this email's content. If 
you are not the intended recipient, please notify the sender 
immediately and then delete the email and any attachments from your 
system.

RNIB has made strenuous efforts to ensure that emails and any 
attachments generated by its staff are free from viruses. However, it 
cannot accept any responsibility for any viruses which are 
transmitted. We therefore recommend you scan all attachments.

Please note that the statements and views expressed in this email 
and any attachments are those of the author and do not necessarily 
represent those of RNIB.

RNIB Registered Charity Number: 226227

Website: http://www.rnib.org.uk 

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread