Win a copy of React Cookbook: Recipes for Mastering the React Framework this week in the HTML Pages with CSS and JavaScript forum!
  • 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 ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Frits Walraven
  • Himai Minh

Unmarshalling XML with Multiple Namespaces in JAVA

Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I have an XML as shown below:

xmlns:uax is more like a container with different types of results, may be string, int etc.

To unmarshall this XML, I have the classes written for Registry, Student and I am not sure how to code for the Value class( Also looking for help here)

But I do not understand how to code for Value class here.. However for now, it is an empty class for me.

To support for different namespaces, I saw some articles which recommended the use of package-info file with details of the namespaces.

I follow a dummy code which succesfully unmarshalls and marshalls and prints out the XML.

I get the resposne as shown below:

I get an extra namespace ns3, which should not be present. Any suggestions to overcome this please? Also how will I be able to code for the Value class?

Roses are red, violets are blue. Some poems rhyme and some don't. And some poems are a tiny ad.
the value of filler advertising in 2021
    Bookmark Topic Watch Topic
  • New Topic