XML 2 Obect class usage and minor fix
I was tooling around with John Grden's new XML2Object class but had an error with experimenting with an Odeo feed. The problem occurred when attempting to access the enclosure.url attribute in the xml below. It wasn't converting the enclosure node to an object because enclosure didn't have child nodes. I made a few changes to the class and things seem to be tracing better.
Here's the new class
Here's the rss feed
Here's how it's tracing:
- rss = [object Object]
- version = 2.0
- xmlns:itunes = http://www.itunes.com/DTDs/Podcast-1.0.dtd
- channel = [object Object]
- item = [object Object]
- itunes:author = geekinger
- link = http://odeo.com/show/853902/view
- description = undefined
- pubDate = Thu, 09 Mar 2006 22:58:42 GMT
- itunes:author = geekinger
- guid = [object Object]
- isPermaLink = false
- enclosure = [object Object]
- length = 1
- type = audio/mpeg
- url = http://odeo.com/show/download/971166/1037965/media.odeo.com.files.u.6.t.draft71037out.mp3
- length = 1
- item = [object Object]
- title = Audio from geekinger (Mar 9, 2006)
- itunes:image = [object Object]
- href = http://media.odeo.com/images/default_icon.gif
- itunes:image = [object Object]
- ttl = 40
- language = en-us
- description = yeah thats me.
- itunes:author = geekinger
- link = http://odeo.com/
- title = geekinger
- version = 2.0
Here's the path to the values.
(1233) channel.item.guid: [object Object]:
(1234) obj.rss.version: 2.0:
(1234) obj.rss.channel.enclosure.url:
http://odeo.com/show/download/971166/1037965/media.odeo.com.files.u.6.t.draft71037out.mp3:
us
gwoo's posts (22)
seth's posts (21)
Nate's posts (0)
subscribe

archives
June 2007 (1)
May 2007 (2)
March 2007 (1)
November 2006 (1)
October 2006 (2)
August 2006 (3)
July 2006 (1)
June 2006 (2)
May 2006 (1)
April 2006 (5)
March 2006 (11)
February 2006 (4)
January 2006 (4)







