A lax Web news feed parser
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

26 lines
612 B

Content-Type mismatch:
type: application/feed+json
input: '<rss><channel/></rss>'
exception: notXMLType
Malformed XML:
input: >
<rss>
<channel>
</rss>
exception: notXML
Root element of non-feed type:
input: >
<html/>
exception: notXMLFeed
Non-feed RDF document:
input: >
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://channel.netscape.com/rdf/simple/0.9/"/>
exception: notXMLFeed
Non-feed Atom document:
input: >
<entry xmlns="http://www.w3.org/2005/Atom"/>
exception: notXMLFeed