Sign In/My Account | View Cart  
advertisement

Article:
 Parsing RSS At All Costs
Subject: Agreed. So what's your solution?
Date: 2003-01-22 18:36:10
From: Mark Pilgrim
Response to: This Article is Quite Depressing

The tone of the article is based on the demonstrated realities of the RSS world, which I agree is depressing. Are you proposing a solution (other than the two I proposed)? Or are you just idly wishing that life was easier for developers?

No Previous Message Previous Message Move up to Parent Message Up Next Message Next Message


Titles Only Full Threads Newest First
  • Agreed. So what's your solution?
    2003-01-30 09:00:19 Jon Wickström [Reply]

    In this case with RSS. I believe the providers of the feed should care enough for it to check that it is not broken. And if the document is broken, how much should you fix it? There might be bits and pieces missing or completely wrong. If the document is silently fixed, how are you to know what you are missing?


    If the document has two root elements, which one would you choose? Both? Should open tags be closed? Maybe the content of the document still is broken?


    On the other hand. It would be very convenient in an RSS client when an invalid document is encountered to have a pop-up asking "Fix broken document? Yes/No". But I think the key point is to inform the user that the document is broken!
    And if the RSS feed is fed into something else a notation that the document has been modified must be included...


    Should this bee seen in a bigger context. Should all XML documents be fixed by the parser? Only well-formedness or also if not valid?


    From a programmers standpoint it is very nice to know that you can (and should?) throw away a broken document because parsing it otherwise probably would propagate errors.

  • Agreed. So what's your solution?
    2003-01-22 20:27:27 Dare Obasanjo [Reply]

    It depends on what you consider to be the problem. From my perspective, the problem is websites that provide non-standards compliant XML in their RSS feeds while from yours it is consuming this XML even if it does not comply with the W3C XML 1.0 recommendation.


    The solutions from my point of view would rely on pressuring sites and tools that produce invalid RSS feeds to correct them and creating tools like the RSS validator produced by yourself and Sam Ruby (which is an excellent contribution to the community).


    The temporary benefit of being able to read ill-formed RSS feeds is outweighed by the harm caused to XML and the Web by fostering the idea that it is OK to produce and consume XML that does not conform to W3C standards. XML has been successful thus far because of the fairly strict adherence to standards by vendors, producers and consumers of XML documents. It is unfortunate that your article is attempting to undermine this even though your intentions are good.


Sponsored By: