File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes [JAXB] StringBuffer element issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "[JAXB] StringBuffer element issue" Watch "[JAXB] StringBuffer element issue" New topic
Author

[JAXB] StringBuffer element issue

Kris Lee
Greenhorn

Joined: Feb 23, 2011
Posts: 1
When marshaling an object via JAXB with a StringBuffer attribute, that attribute becomes blank. I wrote a small program to demonstrate the problem:



The output is as follows:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><jaxbTest><valueOne>12345</valueOne><valueTwo/></jaxbTest>

Does anyone know why "valueTwo" is not being marshaled correctly? BTW, i am using java 1.6.0_22.

Thanks!!!
Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3071
    
  33

What is the Schema you are using for generating the XML?


Mohamed Sanaulla | My Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [JAXB] StringBuffer element issue