Rakshan Premsagar

Greenhorn
+ Follow
since Aug 18, 2021
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
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)

Registry.java


Student.java



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.

package-info.java




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 student.java


As well as Students.java


And of course the Main program: ParsingXML.java


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 years ago