- Marshaller m = JAXBContext.newInstance( Item.class ).createMarshaller();
- m.setProperty( "com.sun.xml.internal.bind.characterEscapeHandler", new CharacterEscapeHandler() {
- @Override
- public void escape( char[] ac, int i, int j, boolean flag, Writer writer ) throws IOException
- {
- // do not escape
- writer.write( ac, i, j );
- }
- });
- m.marshal( i1, new OutputStreamWriter( System.out ) );
No hay comentarios.:
Publicar un comentario