ok been working with a big xml file and what im trying to do is parse this xml file and get say,
track id , arti , tite and fnae
and return each item in the xml document that has those values
have tryied following code,
XmlDocument doc = new XmlDocument();
doc.Load(@"C:\Users\elfen\AppData\Local\elfenliedtopfan5-storeddbs\Database\Database.xml");
XmlNodeList nodes = doc.SelectNodes("/database/tracks/track");
foreach (XmlNode node in nodes)
{
//string trackID = node.Attributes[0].InnerXml;
//string Artist = node.Attributes[1].InnerXml; // this works for part of them but each song is diffent and not able to return the fnae as in certin areas it does not fall under the 3rd attribute
//string Title = node.Attributes[2].InnerXml;
string testme = node["fnam"].InnerText;
}
the following one-string test me gives me node not instance of an object error
a rundown of the xml document.
B0qC3hLB
any help would be much appreciated as not quite sure how to do this run through quite a few xml parse methods i know but unable to get the desired result.
Thank you in advance.