XML Parser for JavaScript - xml2array()

xml2array() Demos...

Parse the content of this site's RSS feed -
Parse my software database's XML file -
Parse this site's sitemap file - this is kinda big - around 600 lines -

loading...

Parse Results

Test area

Try to access elements of the array using commands like...


alert(arr['rss']['channel']['title']);
alert(dump(arr['rss']['channel']['item'][0]));
new_arr = parseFile('rss.xml');
...

Comments

Yash at 15 Jun, 2007 09:34
Wow..really good one
Reply to this.
ZS at 21 Jun, 2007 05:08
In IE7: arr.rss.channel is null or not an object.

Love the script but damn, I just finished up a big project using xml2array in FireFox for testing now IE is shot.
Reply to this.
Anonymous at 20 Dec, 2008 04:05
Its 2.04 am right now, and this is the best thing since sliced bread!

thank you!!!
Reply to this.
Anonymous at 05 Jan, 2009 07:43
sorry, didn't work AT ALL for me. In Safari for Mac and FF for Mac:

'rss' => "undefined"

then for the software database:

'programs' => "undefined"

no result at all for sitemap file

I cannot believe how FUCKING hard it is to find an XML parser for JS that actually fucking works.
Reply to this.
Binny V A at 01 Feb, 2009 11:49
Sorry - small bug in a debug script. Should be working now.
Reply to this.
Comment

Please dont enter you comments in this form - this is a fake form to confuse spamming bots. The next form is the real one.




Comment




Comment Formating : HTML tags a, strong, em, b, i, code, pre, p and br allowed. Other tags will be shown as code(< will become &lt;). Urls, Line breaks will be auto-formated.