私は原子フィード/ xmlファイルからいくつかの行を取得し、データベースに入れたいと思います。私はデータベースに文字列を入力する方法を知っていますが、私はこれが初めてであるので、XMLファイルで作業する方法を理解するのには苦労しています。 は、xmlファイルは "C:\ feed.xml" と言うことができますし、このようになります。.. database.insertの一部を心配しないでくださいvb.net xml atom feed属性を取得
<?xml version="1.0" encoding="utf-8" ?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>This is the Title</title>
<link href="https://www.website.com"></link>
<entry>
<title>Title 1</title>
<link href="http://www.website.com/Title/page1"></link>
</entry>
<entry>
<title>Title 2</title>
<link href="http://www.website.com/Title/page2"></link>
</entry>
</feed>
擬似コード...
Dim doc As XDocument = XDocument.Load("C:\feed.xml")
For i = 0 to entry.count - 1
Dim String1 as String = title(i).InnerText
Dim String2 as String = link href(i).InnerText
database.insert(String1, String2)
Next i
、私はそれを行う方法を知っている、私はちょうどString1とString2を取得するのに役立つ必要があります。具体的にString2私はちょうどString2 = "http // www.website.com /タイトル/ページ1"(注:目的には不足しています)
私はそれが必要なので、ありがとう。
(.aspxのhttps://msdn.microsoft.com/en-us/library/system.servicemodel.syndication.syndicationfeed(V = vs.110))[SyndicationFeed]を参照されたいです。 –