<bookstore>
<book category="COOKING">
<title >Everyday Italian</title>
<author>Giada De Laurentiis</author>
<year>2005</year>
<price>30.00</price>
</book>
<book category="CHILDREN">
<title>Harry Potter</title>
<author>J K. Rowling</author>
<year>2005</year>
<price>29.99</price>
</book>
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.