Jump to content

DOM Object. How do I get the name/attributes of the root element?


GV1

Recommended Posts

I'm developing an RSS feed reader that reads different feed types: RSS 1.0, RSS2.0, RSS 0.9 and Atom.

 

To differentiate between the feed types, and chose how to parse the feed, I need to view the root node and it's attributes.

 

I have searched high and low to figure out how to do this. Any advice?

 

For example, RSS 0.9 feeds have <rdf:RDF ... as the root, 2.0 have <rss ... So far I can't figure out how to view the root node. I've even tried getElementsWithTagName() and it don't seem to pick up on the root node.

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.