Golang rss xml 解析 <atom10:link 覆盖 <link>

下面的 Go 代码<link>如果在<atom10:link ...>tag之后返回tag 值,否则返回空。


<link>如果标签值出现在之前,我如何获取它<atom10:link...>?或者,我如何获得两者?


xml:


<?xml version="1.0" encoding="UTF-8"?>

<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2enclosuresfull.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

  <channel>

    <title>The Javascript</title>

    <link>http://javascript.com</link>

    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/the-javascript-show" />

    <pubDate>Fri, 01 Mar 2013 23:16:58 GMT</pubDate>

    <language>en-us</language>

    <itunes:subtitle>News and discussion about the latest in Javascript.</itunes:subtitle>

    <itunes:keywords>javascript,java,news,jquery,prototype,mootools,scriptaculous</itunes:keywords>

    <itunes:explicit>no</itunes:explicit>


    <media:keywords>javascript,java,news,jquery,prototype,mootools,scriptaculous</media:keywords>

    <media:category scheme="http://www.itunes.com/dtds/podcast-1.0.dtd">Technology/Tech News</media:category>

    <itunes:category text="Technology">

      <itunes:category text="Tech News" />

    </itunes:category>



慕无忌1623718
浏览 270回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Go