I have an XML where the structure looks as below. It is a complex XML where we have multiple attributes. How to convert this XML to JSON using java. Please suggest.
The input looks something like below.
input
<?XML version="1.0" encoding="UTE-8"?>
<Products>
<Product>
<List>
<Property name="description" value="Skype"/>
</List>
</Product>
</Products>
Expected Output is
{
"Products": {
"Product": {
List": [
{
"description": "Skype"
}
]
}
}
}