[xsd-users] preserve newlines in xs:string while serialization
Marco Gerber
mgerber at junisphere.net
Tue Nov 3 03:48:20 EST 2009
Hello everybody
My xml schema has an element which contains a script (bash/perl ...) as
formatted text. As discussed in [1], my element is also of type
xs:string without any whitespace restrictions.
<xs:element minOccurs="0" name="Script" type="xs:string" />
While serialization, I also set noskipws on my ofstream os. While using
the xsd generated tree serialization method (serializeInventory(os,
m_xml_inventory, map, "ISO8859-1")), all newlines are replaced by a
space. The same happens when I set whiteSpace restriction to
'preserve'.
What am I doing wrong?
[1]
http://www.codesynthesis.com/pipermail/xsd-users/2009-October/002535.htm
l
More information about the xsd-users
mailing list