需的链接信息,curItem 包含每个新闻项的一个记录,并带有该文章的标题、链接和说明。 使用 FoxPro textmerge 生成 RSS FoxPro textmerge 可以通过以下代码快速而有效地生成 XML,这段代码将生成一个 RSS 2.0 feed: LOCAL lcXML as String, lcContents as String, lcFileName STORE SPACE(0) TO lcXML, lcContents #DEFINE CRLF CHR(13)+CHR(10) lcFileName = "trweb.xml" * Read header information SELECT cTitle as Title, ; cLink as Link, ; mDesc as Description ; FROM trhead ; INTO CURSOR curHead * Read news items Select TOP 10 cTitle as Title, ; tUpdated as pubDate, ; mContent as Description, ; cLink as link ; FROM trweb ; ORDER BY tUpdated descending ; INTO CURSOR curItem * Generate the items - body' SELECT curItem SET textmerge TO memvar lcXML additive
页码:[1] [2] [3] [4] [5] [6] [7] [8] 第5页、共8页 |