Reputation: 1
How do I convert the following string into XML element using JAVA
String: TeacherId=ABCDEFGH&Action=Student&StudentId.Id.1=1001&StudentId.Id.2=1002&ClassRoom=12B&Year=2020
Excepted Output:
<School>
<ClassRoom>12B</ClassRoom>
<StudentId>
<Id>1001</Id>
<Id>1002</Id>
</StudentId>
</School>
Upvotes: 0
Views: 258