Search

SQL XML Bulk Load removes line breaks by Alsvha

Active

1
0
Sign in
to vote
Type: Suggestion
ID: 531261
Opened: 2/5/2010 6:30:30 AM
Access Restriction: Public
1
Workaround(s)
The issue is with XML file which contains "carriage return, line feed (CRLF)" as the line break within node values, then importing via SQL XML Bulk Load (SQLXMLBulkload.4.0) removes both those characters.

Normally – only "line feed (LF)" are the standard method of assigning line breaks in XML, but because the Microsoft environment uses CR+LF this behaviour gives a discrepancy as to how the information flow is handled.
Details (expand)
Product Language
English

Category

SQL Server XML

Proposed Solution

Ideally the parsing within SQL XML should retain both CR+LF and import the characters as such, to keep the most clean data flow in a pure windows environment.
(Receiving a file containing CR+LF, importing the CR+LF and being able to export the CR+LF without having to post/pre-process the files.)

Or at least only the CR should be removed and the LF should be retained in the imported information.

Benefits

Improved Reliability
Other (please provides details below)

Other Benefits

Consistency in dataflow when importing
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 2/8/2010 at 4:47 PM
Hi Allan

Thanks for posting this. We have assigned it to the SQLXML team for further investigation.

As you are aware from email communication, there are some potential workarounds.

Best regards
Michael
Sign in to post a workaround.
Posted by Alsvha on 2/5/2010 at 6:37 AM
Preprocess the file, and replace CR+LF to another character, after import post-process the imported data and replace the character back to CR+LF