• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

JAXB issue: how to convert List<Serializable> to String

 
Ranch Hand
Posts: 53
Eclipse IDE MySQL Database Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 3036
12
Mac IntelliJ IDE Python VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 733
7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic