• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JAXB List iterator

 
Channy
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having a problem hopefully someone can help me out. I have my xml file:

My problems is that when I unmarshall the xml file, I use :

Which is fine, and gives me all my Links, then I use another for loop to get all my images. What I want to do is print out the objects as they appear in the xml file. Can I have some sort of if next is image, if next is link? Something like that?
Thanks for the help.
 
prashanth nagaraj
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can try if(image!=null) or (link!=null) before going to the corresponding links
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic