Title: Message
Thanks, Chris. Looking at your answers, it seems to me that changing the 'hardcodedness' of the double quotes is (and should be) achievable. True, it might be a lot of hassle, depending on in how many places it's hardcoded .. but if there's need, I asm sure that can be changed (with a little help from your users, if possible ... ;-) ).
 
Regards
Werner


From: ELVART, CHRISTOPHER (SBCSI) [mailto:[EMAIL PROTECTED]
Sent: Donnerstag, 04. Mai 2006 18:07
To: [email protected]
Subject: RE: [castor-user] Use single quote for attributes when marshall object with castor

I see nobody replied to you on this so I'll give it a try.
 
 ... am trying to figure out a way to use single quote for attributes when an object is marshalled using castor Marshaller class.
After looking at the code a little it seems to be that the double quote on attributes is hard coded behavior that you can't change.

>  I also noticed that double quotes in the actual value of an attribute is escaped while single quote is not. 

True.  It only needs to encode the quote type used to contain the data. 

 > the ">" symbol are not escaped, but the "<" are 

True.  ">" is not a relevant character inside XML data.  It only has meaning when inside a tag and outside of an attribute. 

 > I am not supposed to write the encoding information in <?xml version="1.0" encoding="UTF-8"?> 

 CODE:  marshaller.setSupressXMLDeclaration(false)

 Good Luck,

Chris Elvart, AT&T

Reply via email to