【发布时间】:2019-02-13 00:40:17
【问题描述】:
播客定义其 rss 提要似乎没有一致的方式。 遇到一个为 RSS 使用不同架构定义的系统。
使用 XML::LibXML 在 RSS url 中扫描 xmlnamespace 的最佳方法是什么
例如
一个提要可能是
<rss
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/" version="2.0">
另一个可能是
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"version="2.0"
xmlns:atom="http://www.w3.org/2005/Atom">
我想在我的脚本中包含对所有正在使用的命名空间的评估,以便在解析 rss 时,可以跟踪适当的字段名称。
还不确定那会是什么样子,因为我不确定这个模块是否有能力执行我想要的 <rss> 标签属性原子化。
【问题讨论】: