Hello, I have a windows form with a textBox and a treeView, the textBox contains the location of an OPML file("c://documents/file.opml"). How can I parse the file and transform some extracted text into System.Windows.Forms.TreeView?
Here is an exemple of the content of the file:
<?xml version="1.0" encoding="utf-8"?>
<opml version="1.1">
<head>
<title>My Subscriptions</title>
</head>
<body>
<outline text="Catégorie1" >
<outline text="Sience" >
<outline text="Science Signaling" xmlUrl="http://stke.sciencemag.org/rss/current.xml" htmlUrl="http://stke.sciencemag.org/" description="Science Signaling, the Signal Transduction Knowledge Environment" language="en" type="RSS" />
</outline>
<outline text="Sport" >
<outline text="L'Equipe.fr Actu Golf" xmlUrl="http://www.lequipe.fr/rss/actu_rss_Golf.xml" htmlUrl="http://www.lequipe.fr" description="L'Equipe.fr, Toute l'actualité du golf" type="RSS" />
<outline text="L'Equipe.fr Actu Rallye" xmlUrl="http://www.lequipe.fr/rss/actu_rss_Rallye.xml" htmlUrl="http://www.lequipe.fr" description="L'Equipe.fr, Toute l'actualité des rallyes" type="RSS" />
</outline>
</outline>
<outline text="Catégorie2" >
<outline text="economy" >
<outline text="Business Daily" xmlUrl="http://downloads.bbc.co.uk/podcasts/worldservice/bizdaily/rss.xml" htmlUrl="http://www.bbc.co.uk/programmes/p002vsxs" description="Examining the big issues facing the global economy, Business Daily demystifies the world of money. From giant industries like aviation and automotive to the smallest scale start-up, Business Daily asks the big questions about free trade, technology and investment. There is also analysis of management and marketing trends, and what business jargon really means - together with reports on business news from around the world via the BBC's global network of reporters." type="RSS" />
<outline text="Business & Economy Coverage | PBS NewsHour Podcast | PBS" xmlUrl="http://www.pbs.org/newshour/rss/podcast_business.xml" htmlUrl="http://www.pbs.org/newshour/topic/business/" description="The latest news, analysis and reporting about Business & Economy from the PBS NewsHour and its website, the feed is updated periodically with interviews, background reports and updates to put the news in a larger context." type="RSS" />
</outline>
<outline text="politic" >
<outline text="Power and Politics with Evan Solomon from the
CBC News Network (Highlights)" xmlUrl="http://www.cbc.ca/podcasting/includes/powerandpolitics.xml" htmlUrl="http://www.cbc.ca/podcasting" description="Get daily access to the movers and shakers when Evan interviews the country's most influential figures. From politicians to writers to leaders from all parts of the country." type="RSS" />
<outline text="Politics Weekly" xmlUrl="http://www.guardian.co.uk/politics/series/politicsweekly/podcast.xml" htmlUrl="http://www.guardian.co.uk/audio" description="Political analysis from the Guardian and Observer's top journalists and commentators" type="RSS" />
</outline>
</outline>
</body>
</opml>
Here is what i want to show:
-Categorie1
-sience
Sience Signaling
-sport
L'Equipe.fr Actu Golf
L'Equipe.fr Actu Rally
-Categorie2
-economy
Business Daily
Business & Economy Coverage | PBS NewsHour Podcast | PBS
-politic
Power and Politics with Evan Solomon from the...
Politics Weekly