Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Insert a CRLF when transforming XML into text

From: "Neil Smith [MVP Digital Media]" <neil@------.--->
To: NULL
Date: 1/4/2009 1:58:00 AM
On Sat, 3 Jan 2009 16:40:00 -0800, Savvoulidis Iordanis
<SavvoulidisIordanis@d...> wrote:

>I want to create a CSV (text) file out of a XML file, so it can be bulk 
>copied into SQLServer. How can I insert a CRLF char when I'm done converting 
>every record into its corresponding CSV?



You need to add the character entity corresponding to a newline /
carriage return after each output group (inside your xsl:for-each)  :

<xsl:text>&#10;&#13;</xsl:text>


Note the snippet you provided should probably have a line after
xsl:stylesheet and before xsl:template reading 

<xsl:output method="text" .... />

HTH
Cheers - Neil
------------------------------------------------
Digital Media MVP : 2004-2009
http://mvp.support.microsoft.com/mvpfaqs


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent