Yes I am very slowly developing WallRush, but I guess there's some progress. I have finally cracked the RSS import problem - mostly. First of all I wanted it to be able to handle both normal RSS and ATOM. This isn't a crazy thing to demand, so I naivly thought i could use the XMLDoc object to parse both formats. I was wrong - some feeds are invalid and there's no way to make XMLDoc read invalid XML.
Workaround?
It seems, that microsofts implementation of the xmlhttp object believes that it should always use UTF-8 encoding if the mime-type is text/xml, when the responseText is accessed. This is bad, because ASP doesn't - to my knowledge - let me encode text as I please, and lets pretend i might losen up a bit on the parsing of invalid XML by writing my own parser. In that case I have to work with malformed text when using the responseText property. I tried to use the Text property of the responseXML, however it failed in the same manner as responseText returning malformed text because the it was incorrectly encoded with UTF-8.
Why can't i just use responseXML and the XMLDoc object? Because it refuses to parse invalid XML, and I can't expect everyone to pass valid XML every time. I'm of course not the only guy with this problem and it seems that using ADO to fetch the feed, it might be possible to decide the encoding of the text, but I will have to look into that.
However not all is bad. The import feature works again, just not with foreign character sets (like danish). I fixed the object_hit function so preferences is now recorded again for videos. I also changed some of the graphics. I think it is much better now. And i added a list of available videos so that i don't have to go through them all to find those I am interested in.
onsdag den 3. juni 2009
Abonner på:
Kommentarer til indlægget (Atom)
Ingen kommentarer:
Send en kommentar