Cumulus / Syndic

RSS and Atom feed parsing
MIT License
34 stars 13 forks source link

Function that detects format #71

Open kit-ty-kate opened 8 years ago

kit-ty-kate commented 8 years ago

Is it possible to have such a function ? (at least one that could detect between RSS 1.0, RSS 2.0 and Atom)

Chris00 commented 8 years ago

Well, you could try to parse it as RSS 2 and, if it fails, try RSS 1. Would you like something less "expensive"?

kit-ty-kate commented 8 years ago

Well, the thing is, I think it would be more users friendly to expect users to not know about implementation/formats details (i.e. expect all three formats/parsing to be different in all cases). Also, efficiency can be a concern of course.