

[Golang] XML Parsing Example (5) - Parse OPML
source link: http://siongui.github.io/2015/02/25/go-parse-opml/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Based on previous examples, this post shows how to parse OPML file. The following OPML example comes from my web feeds:
example-5.xml | repository | view raw
<?xml version="1.0" encoding="UTF-8"?> <opml version="1.0"> <head> <title>Feeder - RSS Feed Reader</title> </head> <body> <outline text="Hacker News" title="Hacker News" type="rss" xmlUrl="https://news.ycombinator.com/rss" htmlUrl="https://news.ycombinator.com/" rssfr-favicon="https://news.ycombinator.com/favicon.ico"/> <outline text="CSDN最新资讯" title="CSDN最新资讯" type="rss" xmlUrl="http://www.csdn.net/article/rss_lastnews" htmlUrl="http://news.csdn.net" rssfr-favicon="http://s2.googleusercontent.com/s2/favicons?domain=csdn.net"/> <outline text="Solidot" title="Solidot" type="rss" xmlUrl="http://www.solidot.org/index.rss" htmlUrl="http://www.solidot.org" rssfr-favicon="http://s2.googleusercontent.com/s2/favicons?domain=solidot.org"/> <outline text="Slashdot" title="Slashdot" type="rss" xmlUrl="http://rss.slashdot.org/Slashdot/slashdot" htmlUrl="http://slashdot.org/" rssfr-favicon="http://slashdot.org/favicon.ico"/> <outline text="InfoQ中文" title="InfoQ中文" type="rss" xmlUrl="http://www.infoq.com/cn/rss/rss.action?token=Apz6T7JrRXKONbiLoKzdoHiJ8uTgu5ef" htmlUrl="http://www.infoq.com/cn/" rssfr-favicon="http://infoqstatic.com/favicon.ico"/> <outline text="外刊IT评论" title="外刊IT评论" type="rss" xmlUrl="http://www.aqee.net/feed/" htmlUrl="http://www.aqee.net" rssfr-favicon="http://s2.googleusercontent.com/s2/favicons?domain=aqee.net"/> <outline text="博客 - 伯乐在线" title="博客 - 伯乐在线" type="rss" xmlUrl="http://blog.jobbole.com/feed/" htmlUrl="http://blog.jobbole.com" rssfr-favicon="http://cdn2.jobbole.com/2013/10/favicon.png"/> </body> </opml>
Recommend
-
10
Building a Large Scale Distributed Outline Renderer for OPML Apr 23, 2002 Building a Large Scale Distributed Outline Renderer for OPML Last updated: 6/5/2002; 8:34:17 AM
-
7
Souce Code Run code on Go Playground parse-6.go |
-
13
[Golang] XML Parsing Example (3) February 21, 2015 In this exmaple, we will parse a
-
9
[Golang] XML Parsing Example (4) February 24, 2015 In this exmaple, we will parse a
-
10
[Golang] XML Parsing Example (6) - Parse OPML Concisely February 26, 2015 The previo...
-
6
Introduction When I tried to get the timestamp of the Facebook post, I found that the timestamp...
-
9
Souce Code Run code on Go Playground parse-7.go |
-
11
[Golang] XML Parsing Example (2) Updated: February 21, 2015 following previous p...
-
6
[Golang] XML Parsing Example (1) Updated: February 21, 2015 Assume we have a XML file as follows:
-
4
kmaasrudOPML is underrated As a response to the general enshittification of major platforms, I would say we are...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK