from the given piece of xml document
how to read the attributes names and their values from an xml document as the given format below
{category:'COOKING',title:'Everyday Italian',author: 'Giada De Laurentiis',year: '2005',price:'30.00'}
{category:'CHILDREN',title:'Harry Potter',author: 'J K. Rowling',year: '2005',price:'29.99'}
is there any sample code that i can refer ?
thanks in advance.

Rajanikant HawaldarRank #110 · 20.2K reputationPosted Jun 28, 2019, 1:20 AM EDT
Amit MohantyRank #112 · 20K reputationPosted Jun 28, 2019, 1:41 AM EDT
Jaish MathewsRank #225 · 11K reputationPosted Jun 28, 2019, 2:11 AM EDT