*
The moose likes XML and Related Technologies and the fly likes JAXB issue: how to convert List<Serializable> to String Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "JAXB issue: how to convert List&lt;Serializable&gt; to String " Watch "JAXB issue: how to convert List&lt;Serializable&gt; to String " New topic
Author

JAXB issue: how to convert List&lt;Serializable&gt; to String

hemamalini nithyanandam
Ranch Hand

Joined: Oct 24, 2011
Posts: 45

I have an xsd schema


and XML


i used JAXB parser and genarated a class



i am able to get the values using ValueObj.getContent() when


but i am getting an object for filename. how to read string from List<Serializable> when


have a nice day - hema
Greg Charles
Sheriff

Joined: Oct 01, 2001
Posts: 2833
    
  11

It looks to me like you're having an issue with the way JAXB generates classes based on the schema. I'm going to move this into our XML forum, and enhance your subject line a bit for clarity.
g tsuji
Ranch Hand

Joined: Jan 18, 2011
Posts: 499
    
    3
For each ValueType object you've got (I suppose you have arrived at that stage no problem from the wording of your question), you can do this to get all the data you seem to be interested in retrieving.

Since it is of mixed content type, the empty string (after trim()) will be picked up as well if there really isn't any text node directly under value tag. You just have to screen the data further as needed.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JAXB issue: how to convert List&lt;Serializable&gt; to String
 
Similar Threads
JAXB- how to define XSD for XML with varying elements and parse using JAXB
JAXB Saving and loading a generic List of type T to/from XML
JAXB : Java complilation error after XJC Compilation
JAXB issue
XJC unable to parse xsd and generate java classes