Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!

Rakshan Premsagar

+ Follow
since Aug 18, 2021
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Rakshan Premsagar

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?

I have a sample XML, would want to create objects and store them in a list. The XML contains the following:

I create the classes

As well as

And of course the Main program:

I want to store the objects in an internal list. I expect it to have 2 entries of id 1 and 2.

However I get the following output

Only the second entry is shown here. I believe it is getting overwritten. Could anyone provide me some insights to have both the values, please

2 months ago