View Single Post
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Cindy M. Cindy M. is offline
external usenet poster
 
Posts: 2,416
Default How can I preserve the line returns when saving as xml data?

Hi ?B?WXVmZWk=?=,

I use a custom defined schema to apply some xml tags in the Word Document.
Then I save the file as XML file(data only). However, if there are several
paragraphs in one XML tag, the line returns are not preserved in the result
xml. It became one big blog of text.

How can I preserve the line returns in the result xml file?

There's nothing built into Word that will allow you to do this. The argument
during the Word 2003 beta was that in "standard" XML white space is not
preserved. Plus, a Word paragraph is not equivalent to new lines or carriage
returns in a pure text file. Therefore, you need to use a TRANSFORM when
saving that specifies you want to retain the whitespace in the result.

If you want to pursue this, I recommend posting to the XSLT newsgroup, or
perhaps to the office.xml newsgroup (although there's little activity there).

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)