Results 1 to 8 of 8

Thread: [RESOLVED] Help Reading DataSet from XML

Threaded View

  1. #4
    Hyperactive Member umilmi81's Avatar
    Join Date
    Sep 2005
    Location
    Sterling Heights, Mi.
    Posts
    335

    Re: Help Reading DataSet from XML

    Quote 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.
    Last edited by umilmi81; May 23rd, 2006 at 01:23 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width