Menu

#44 problem with link-item in RSS

wont-fix
None
2018-12-08
2010-03-31
Ineluki
No

parsing rss-XMLs workes fine mostly, but there is one weird behavior: the parser does not correctly return the link-child of an item. works with anything, but the channel->item->link -item.
printing the item->plaintext revealed that he </link> gets thrown into the plaintext, instead of being recognized, thus making the link->plaintext appear empty.

Discussion

  • LogMANOriginal

    LogMANOriginal - 2018-12-08

    This is because RSS uses XML syntax, while HTML is only based on XML. Unfortunately, link elements have a different meaning in HTML than in RSS (or Atom for that matter), so don't expect a HTML parser to work on XML.

    SimpleXML should work for those feeds: http://php.net/manual/en/book.simplexml.php

     
  • LogMANOriginal

    LogMANOriginal - 2018-12-08
    • status: open --> wont-fix
    • assigned_to: LogMANOriginal
     

Log in to post a comment.