Losing Line-feed in XML parsing (XMLTRANSFORM) or File output (clob2file)?
750651Feb 1 2010 — edited May 5 2010Hi all, need some help please!
I'm using a xslt file to transferm a XML file into a txt format file. Within the XSLT file, there is a carriage-return (<xsl:text>
</xsl:text>) (it disappeared already, here is what i'm using "#xD" or "#xA", have to take the '&' and ';' away), but the final output txt file seems to lose this carriage-return/line-feed information. The output data became one-line.
Here are the steps I've used:
1. lv_xml_data = XMLTRANSFORM (a.xml_data, b.f_xslt)
=> output data into XMLTYPE;
2. using XMLTYPE.getclobval to get the output data into CLOB format.
lv_output_clob := XMLTYPE.getclobval (lv_xml_data);
3. using encoding:
lv_output_clob :=
DBMS_XMLGEN.CONVERT (lv_output_clob, DBMS_XMLGEN.entity_decode);
4. using clob2file write to a file with txt format.
DBMS_XSLPROCESSOR.clob2file (lv_output_clob,
lv_output_dir,
lv_filename,
NLS_CHARSET_ID ('UTF8')
);
Been struggling with these a few days already. Any help is appreciated. I would really like to get some input to see what might cause the carriage-return/line-feed characters lost.
Thanks in advance!
-Jane
Edited by: user9084567 on Feb 1, 2010 1:45 PM
Edited by: user9084567 on Feb 1, 2010 1:47 PM
Edited by: user9084567 on Feb 1, 2010 1:48 PM