
Originally Posted by
brandoom
Thanks. I don't need a dataset, it was just an easy way to import the xml into a grid to see if it would help me visually.
How do I reference the "gpm_cq" on the same line as your Console.Writeline?
I tried pulling up all the intellisense properties on xMode and xMapType and I'm looking through the Locals window but I haven't figured it out yet.
Code:
XmlDocument xd = new XmlDocument();
xd.Load(@"c:\temp\vbforums.xml");
foreach (XmlElement xMode in xd.GetElementsByTagName("modes"))
{
foreach(XmlElement xMapType in xMode.GetElementsByTagName("maptype"))
{
Console.WriteLine(xMapType.GetAttribute("players"));
Console.WriteLine(xMode.GetAttribute("type"));
}
}
Rate my post if it helped you.