C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
9,478 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
hello all i did get support the other week and been looking into linq as suggested,
and been looking into it now if i am not mistaken this should work
XDocument xdoc = new XDocument();
xdoc = XDocument.Load(@"C:\Users\elfen\AppData\Local\PCDJ-DEX3\Database\Database.xml");
var result = from q in xdoc.Descendants("tracks")
select new
{
artist = q.Element("arti").Value,
title = q.Element("titl").Value,
filename = q.Element("fnam").Value
};
}
and xml file....
B0qC3hLB
not sure gone through loads of guides cant see why its not picking these up.
kind regards elfenliedtopfan5
Check this code:
var result = from q in xdoc.Root.Elements( "tracks" ).Elements( "track" )
select new
{
artist = q.Attribute( "arti" )?.Value,
title = q.Attribute( "titl" )?.Value,
filename = q.Attribute( "fnam" )?.Value
};
var list = result.ToList( );