Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 370589

Summary: Add support for Sun RI's CharacterEscapeHandler Marshaller property
Product: z_Archived Reporter: Rick Barkhouse <rick.barkhouse>
Component: EclipselinkAssignee: Rick Barkhouse <rick.barkhouse>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: blaise.doughan, eclipselink.oxm-inbox
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 359251    
Attachments:
Description Flags
Patch - test changes
none
Patch - code changes
none
Patch - test changes
none
Patch - code changes
none
Patch - test changes
none
Patch - code changes
none
Patch - test changes
none
Patch - code changes
none
Patch - test changes
none
Patch - code and test changes - 2.3
none
Patch - trunk
none
Patch - 2.3 none

Description Rick Barkhouse CLA 2012-02-03 12:54:42 EST
From the Sun RI documentation:

Character Escaping Control

Property name:	com.sun.xml.bind.characterEscapeHandler
Type:	com.sun.xml.bind.marshaller.CharacterEscapeHandler
Default value:	 null
By default, the marshaller implementation of the JAXB RI tries to escape characters so they can be safely represented in the output encoding (by using Unicode numeric character references of the form &#dddd;)

Unfortunately, due to various technical reasons, the default behavior may not meet your expectations. If you need to handle escaping more adroitly than the default manner, you can do so by doing the following:

Write a class that implements the com.sun.xml.bind.marshaller.CharacterEscapeHandler interface.
Create a new instance of it.
Set that instance to the Marshaller by using this property.
Comment 1 Rick Barkhouse CLA 2012-02-10 14:52:12 EST
Created attachment 210867 [details]
Patch - test changes
Comment 2 Rick Barkhouse CLA 2012-02-10 14:52:42 EST
Created attachment 210868 [details]
Patch - code changes
Comment 3 Rick Barkhouse CLA 2012-02-10 14:54:38 EST
Created attachment 210869 [details]
Patch - test changes
Comment 4 Rick Barkhouse CLA 2012-02-10 14:55:27 EST
Created attachment 210870 [details]
Patch - code changes
Comment 5 Rick Barkhouse CLA 2012-02-10 15:19:55 EST
Created attachment 210873 [details]
Patch - test changes
Comment 6 Rick Barkhouse CLA 2012-02-21 13:33:11 EST
Created attachment 211351 [details]
Patch - code changes
Comment 7 Rick Barkhouse CLA 2012-02-21 13:33:26 EST
Created attachment 211352 [details]
Patch - test changes
Comment 8 Rick Barkhouse CLA 2012-02-21 13:52:17 EST
Created attachment 211353 [details]
Patch - code changes
Comment 9 Rick Barkhouse CLA 2012-02-21 14:12:27 EST
Created attachment 211357 [details]
Patch - test changes
Comment 10 Rick Barkhouse CLA 2012-02-21 14:15:28 EST
Created attachment 211358 [details]
Patch - code and test changes - 2.3
Comment 11 Rick Barkhouse CLA 2012-02-21 15:52:37 EST
Created attachment 211366 [details]
Patch - trunk
Comment 12 Rick Barkhouse CLA 2012-02-21 15:52:52 EST
Created attachment 211367 [details]
Patch - 2.3
Comment 13 Rick Barkhouse CLA 2012-02-21 15:53:15 EST
Fixed and checked in to 2.3 and trunk.
Comment 14 Eclipse Webmaster CLA 2022-06-09 10:06:30 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 15 Eclipse Webmaster CLA 2022-06-09 10:08:33 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink