Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to read multiple records in XML doc
    text
    copied!<p>I can read one record from Xml just fine with some code I have, but how do you read multiple in an xml file such as so:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;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"&gt; &lt;album&gt; &lt;id&gt;7031990242326938677&lt;/id&gt; &lt;pid&gt;7031990241327042549&lt;/pid&gt; &lt;owner&gt;1642262814&lt;/owner&gt; &lt;location&gt;CA&lt;/location&gt; &lt;/album&gt; &lt;album&gt; &lt;id&gt;7031994332086936240&lt;/id&gt; &lt;pid&gt;703199322241087005994&lt;/pid&gt; &lt;owner&gt;1633262814&lt;/owner&gt; &lt;location/&gt; &lt;/album&gt; &lt;album&gt; &lt;id&gt;7031990241086937544&lt;/id&gt; &lt;pid&gt;7031990241087026027&lt;/pid&gt; &lt;location/&gt; &lt;/album&gt; &lt;album&gt; &lt;id&gt;70319902431086936188&lt;/id&gt; &lt;pid&gt;7033490241087005114&lt;/pid&gt; &lt;owner&gt;1633262814&lt;/owner&gt; &lt;location/&gt; &lt;/album&gt; &lt;/XXX_XXX_response&gt; </code></pre> <p>How do you iterate through each Album and what's a good container for holding that data (what kind of list object, etc.) afterwards? And no, I'm not talking DataSet (puke)</p> <p>I'm not looking for the exact code necessarily (sure if you have it thanks) but an article that relates or shows an example of reading multiple records in .NET.</p> <p>I'm trying to think of the most ideal lightweight object to store each record in so that I can iterate through it later.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload