my dog learned polymorphism*
The moose likes XML and Related Technologies and the fly likes issue while JAXB processing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "issue while JAXB processing" Watch "issue while JAXB processing" New topic

issue while JAXB processing

Amitosh Mishra
Ranch Hand

Joined: Feb 11, 2010
Posts: 49
Hi all,

i am having one issue in jaxb processing.
this is happening when i am trying to write object directly to console

please find below the code block


please let me know what could be the issue??

William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12761
What were you expecting to happen?

Amitosh Mishra
Ranch Hand

Joined: Feb 11, 2010
Posts: 49
I want to know why extra  character is coming in first xml.
when i am unmarshalling the xml and marshalling back the object again to string writer why it is not coming.

Paul Clapham

Joined: Oct 14, 2005
Posts: 18541

It's because you're writing your XML to the console as UTF-8, but the console isn't expecting UTF-8 because it isn't configured that way.

I assume your real application isn't going to be writing XML to the console? In which case you shouldn't spend any time trying to reconfigure the console to support UTF-8. Just ignore this and move on with your real application.
Amitosh Mishra
Ranch Hand

Joined: Feb 11, 2010
Posts: 49
Thanks Paul..
It is sorta covered in the JavaRanch Style Guide.
subject: issue while JAXB processing
Similar Threads
Clarification Requested - XML recordset & JAXB classes
Need Help With JAXB Unmarshaller - Convert XML Back to Java Bean
How to Serialize Maps?
convert java classes to .xsd xml schema in eclise
JAXB2 : Generate Java interface out of a xsd element