As a quick fix, I modified Entry.as in src.com.adobe.xml.syndication.atom below the comment block at line 194.
I'm still working on this, and so this code needs work. It's not the prettiest, but it's a start. Please note that indentations didn't make it from eclipse to blogger.
/*
*JDR -- Changed assignment to content.
* Also, detect for
* I'm also loading the same source for XHTML or not, since ATOM feeds with XHTML I tested
* don't have the x.atom::content.xhtml::div contained.
* And, type="html" is causing >>if (content.type == "xhtml") to valuate true in the debug session.
*
*
*/
public function get content():Content
{
var content:Content = new Content();
content.type = ParsingTools.nullCheck(x.atom::content.@type);
content.src = ParsingTools.nullCheck(x.atom::content.@src);
if (content.type == "xhtml")
{
// this line needs to be changed, but for now, return flat content.
content.value = ParsingTools.nullCheck(x.atom::content);
}
else
{
content.value = ParsingTools.nullCheck(x.atom::content);
}
if(content.src != null || content.value == null)
{
content.type = ParsingTools.nullCheck(x.atom::summary.@type);
content.src = ParsingTools.nullCheck(x.atom::link.(@rel=="self").@href);
if (content.type == "xhtml")
{
content.value = ParsingTools.nullCheck(x.atom::summary);
}
else
{
content.value = ParsingTools.nullCheck(x.atom::summary);
}
}
return content;
}
See here for more info on Atom.
No comments:
Post a Comment