IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Suppress XML declaration line in resulting CSV file Options · View
Wim
Posted: Thursday, October 29, 2009 9:27:32 AM
Rank: Newbie

Joined: 10/29/2009
Posts: 2
Hi,

We use AltovaXML for XML schema validation. I want to use it for XML translation to CSV files too. The transformation itself works excellent, but AltovaXML always puts an XML declaration line on top of the CSV files:
Code:
<?xml version=1.0 encoding=UTF-8?>

The next program (DTS of SQL Server) in the process chain can't cope with this file format. I can instruct the DTS to start processing from line 2, but still it will always look at the very first line to know the column names and there it finds the XML declaration line.

This is what AltovaXML generates now:
Code:
<?xml version=1.0 encoding=UTF-8?>
Column1|Column2|Column3|Column4
Value1|Value2|Value3|Value4
Value11|Value12|Value13|Value14

This is what I want:
Code:
Column1|Column2|Column3|Column4
Value1|Value2|Value3|Value4
Value11|Value12|Value13|Value14

Can I instruct AltovaXML not to generate this XML declaration line? or should I rely on post processing the output with GREP or something like that to filter out the first line?

AltovaXML and the DTS are called from a .BAT batch file.
vlad
Posted: Thursday, October 29, 2009 11:28:38 AM
Rank: Advanced Member

Joined: 12/13/2005
Posts: 2,856
Location: Mauritius
You need to use <xsl:output method="text" ... in your XSL stylesheet. By default method is "xml" and this causes the leading header.
Wim
Posted: Thursday, October 29, 2009 12:36:47 PM
Rank: Newbie

Joined: 10/29/2009
Posts: 2
Thank you very much. It works!

Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.