我可以從XML只是一些代碼,人有我精讀一個記錄,但你如何在XML文件中讀取多個如這樣:如何讀取XML文檔的多個記錄
<?xml version="1.0" encoding="UTF-8"?>
<XXX_XXX_response xmlns="http://example.com/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://example.com/1.0/ http://example.com/1.0/XXX.xsd" list="true">
<album>
<id>7031990242326938677</id>
<pid>7031990241327042549</pid>
<owner>1642262814</owner>
<location>CA</location>
</album>
<album>
<id>7031994332086936240</id>
<pid>703199322241087005994</pid>
<owner>1633262814</owner>
<location/>
</album>
<album>
<id>7031990241086937544</id>
<pid>7031990241087026027</pid>
<location/>
</album>
<album>
<id>70319902431086936188</id>
<pid>7033490241087005114</pid>
<owner>1633262814</owner>
<location/>
</album>
</XXX_XXX_response>
你如何遍歷每個專輯,以及什麼是保存該數據的好容器(什麼樣的列表對象等)?不,我不是說數據集(嘔吐)
我不是在尋找確切的代碼必然(當然,如果你有它謝謝),但一篇文章,涉及或顯示在.NET讀取多個記錄的例子。
我試圖想出最理想的輕量級對象來存儲每條記錄,以便稍後可以遍歷它。