Need a simple javascript script that takes an XML string and converts that into a JSON object.
A sample XML file is shown below:
<categories>
<category>
<name>title1</name>
<icon>[login to view URL]</icon>
<url>[login to view URL]</url>
</category>
<category>
<name>title2</name>
<icon>[login to view URL]</icon>
<url>[login to view URL]</url>
</category>
</categories>