I realise that XML parsers are supposed to reject badly formed XML, but in my limited experience, a sizeable proportion of RSS feeds are badly deployed.
I have alerted several Webmasters to problems I've encountered, but problems aren't always fixed.
Until recently, I used code very similar to what you have above. However, I frequently found myself missing information from badly formed RSS feeds. I can understand the benefits of ignoring badly-formed XML in mission critical situations, but for RSS feeds I'd rather misinterpret the information I'm receiving than receive no information at all. Others' opinions may differ.
With hindsight, I should have written a strong disclaimer with my code that it breaks the XML spec.
In reply to Re: Re: Parsing badly formed RSS or XML
by tomhukins
in thread Parsing badly formed RSS or XML
by tomhukins
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |