[xsd-users] Preserve newline characters
Wire, Keith C
keith.c.wire at lmco.com
Wed Oct 21 11:41:50 EDT 2009
I tried the example as you asked an got the expected results. The newlines and tabs were reserved and printed.
I am running on Solaris 10 Sparc. Compiler is the Solaris CC compiler. Xerces-C++ 2.8
Keith
-----Original Message-----
From: Boris Kolpackov [mailto:boris at codesynthesis.com]
Sent: Wednesday, October 21, 2009 9:29 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 unfortunately do not get to control this schema, but they are using
> xsd:string.
Ok, it should be xsd:string so this is not a problem.
> I used a debugger to look at the string as soon as the generated
> classes are used to extract the parsed data, as well as a print
> statement. Both show none of the newlines.
Can you try building the hello example in the examples/cxx/tree/ directory and changing the greeting string in hello.xml to include some newlines and tabs. Then run the example on this file and see what you get?
If I change:
<greeting>Hello</greeting>
to:
<greeting>Hello
there
tab</greeting>
I get this (expected) output:
Hello
there
tab, sun!
Hello
there
tab, moon!
Hello
there
tab, world!
> I'm using XSD 3.2.0 and cxx-tree.
What platform and compiler are you using? Also what version of
Xerces-C++?
Boris
More information about the xsd-users
mailing list