[xsd-users] Preserve newline characters

Wire, Keith C keith.c.wire at lmco.com
Thu Oct 22 12:13:53 EDT 2009


Well we found the issue.  When extracting the data we were using fstream which by default was skipping the whitespaces.  We set it to not skip (noskipws) and everything works as expected.

Thanks for helping us look in more directions to find the solution.

Keith

-----Original Message-----
From: Boris Kolpackov [mailto:boris at codesynthesis.com]
Sent: Wednesday, October 21, 2009 10:15 AM
To: Wire, Keith C
Cc: xsd-users at codesynthesis.com
Subject: Re: [xsd-users] Preserve newline characters

Hi Keith,

Wire, Keith C <keith.c.wire at lmco.com> writes:

> I tried the example as you asked an got the expected results.  The 
> newlines and tabs were reserved and printed.

Hm, that's strange. Can you copy the text with newlines and tabs from your original document to hello.xml and see if you get them in the output? Can you also try the opposite, i.e., put the text from hello.xml into your document and see if newlines and tabs disappear?

If it works as expected in hello.xml and doesn't work in your application, then there has got to be something special about either your schema or the way you parse XML. Will you be able to send (off list) a test case that reproduce this problem so that I can take a look?

Boris



More information about the xsd-users mailing list