WP8 Xml parser in C# -


i've been trying convert downloaded xml string lists based on element, can't seem find solution. goal artist name.

here excerpt of xml page:

<subsonic-response xmlns="http://subsonic.org/restapi" status="ok" version="1.10.2">   <artists ignoredarticles="the el la los las le les">       <index name="a">          <artist id="15" name="a tribe called quest" coverart="ar-15"    albumcount="5"/>          <artist id="2" name="a$ap ferg" coverart="ar-2" albumcount="1"/>          <artist id="11" name="a$ap mob" coverart="ar-11" albumcount="1"/>          <artist id="353" name="a$ap rocky" coverart="ar-353" albumcount="3"/>          <artist id="382" name="a-1" coverart="ar-382" albumcount="3"/>          <artist id="9" name="a1 bassline & rusko" coverart="ar-9" albumcount="1"/>          <artist id="25" name="aaliyah" coverart="ar-25" albumcount="7"/>          <artist id="1" name="ab-soul" coverart="ar-1" albumcount="4"/>          <artist id="50" name="ace hood" coverart="ar-50" albumcount="18"/>          <artist id="134" name="adele" coverart="ar-134" albumcount="4"/>          <artist id="283" name="aesop rock & del tha funky homosapien" coverart="ar-283" albumcount="1"/>          <artist id="92" name="afroman" coverart="ar-92" albumcount="10"/>          <artist id="280" name="akinyele" albumcount="1"/>          <artist id="421" name="akira kosemura" albumcount="1"/>          <artist id="163" name="akon" coverart="ar-163" albumcount="20"/>          <artist id="152" name="akon, t-pain" albumcount="1"/>          <artist id="106" name="all saints" coverart="ar-106" albumcount="1"/>          <artist id="287" name="almighty" coverart="ar-287" albumcount="1"/>          <artist id="176" name="amanda blank" coverart="ar-176" albumcount="1"/>          <artist id="56" name="asian kung-fu generation" coverart="ar-56" albumcount="6"/>          <artist id="374" name="atmosphere" albumcount="11"/>          <artist id="105" name="attaca pesante" coverart="ar-105" albumcount="1"/>          <artist id="190" name="audio bullys" coverart="ar-190" albumcount="1"/>          <artist id="44" name="august alsina" coverart="ar-44" albumcount="1"/>      </index> <index name="b"> 

here idea have create list "names" before. try this:

xdocument xdoc = xdocument.load("your xml file"); foreach (var elem in xdoc.document.descendants("artist")) {     names.add(elem.attribute("name").value); } 

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -