[castor-user] [XML] \r\n is not escaped during marshalling

2005-11-04 Thread Bedin, Stephane \(GE Healthcare\)
Hi, I'm trying to marshall a class with a field named endOfLine of type String which typically contents \r\n. In the mapping file, I have: field name=endOfLine type=string bind-xml name=endofline node=attribute / /field The problem is that castor does not replace during the marshalling the

Re: [castor-user] [XML] \r\n is not escaped during marshalling

2005-11-04 Thread Keith Visco
Castor uses the Xerces Serializer so the escaping problem would be coming from Xerces not Castor. However you can use an element with xml:space=preserve as such: foo endofline xml:space=preserve /endofline /foo The following trick works for me: ?xml version=1.0? mapping class