I'm working on a project that requires me to build a game's rooms, items and NPC in a separate database. I've chosen XML, but something prevents me from properly parsing the XML in my C# code. What am I doing wrong?My errors are these: \[code\]System.xml.xmlnode does not contain a definition for HasAttribute \[/code\](this goes for \[code\]GetAttribute\[/code\] as well) and no extension method accepting \[code\]'HasAttribute'\[/code\] accepting a first argument of type \[code\]System.Xml.XmlNode\[/code\] ? This also goes for \[code\]GetParentNode\[/code\], and my very last line \[code\]string isMoveableStr = xmlRoom.GetAttribute("isMoveable");\[/code\]somehow goes:\[code\]the name xmlRoom does not exist in the current context\[/code\]Here's the method: \[code\]public void loadFromFile() { XmlDocument xmlDoc = new XmlDocument(); // create an xml document object in memory. xmlDoc.Load("gamedata.xml"); // load the XML document from the specified file into the object in memory. // Get rooms, NPCs, and items. XmlNodeList xmlRooms = xmlDoc.GetElementsByTagName("room"); XmlNodeList xmlNPCs = xmlDoc.GetElementsByTagName("npc"); XmlNodeList xmlItems = xmlDoc.GetElementsByTagName("item"); foreach(XmlNode xmlRoom in xmlRooms) { // defaults for room: string roomID = ""; string roomDescription = "this a standard room, nothing special about it."; if( !xmlRoom.HasAttribute("ID") ) //http://msdn.microsoft.com/en-us/library/acwfyhc7.aspx { Console.WriteLine("A room was in the xml file without an ID attribute. Correct this to use the room"); continue; //skips remaining code in loop } else { roomID = xmlRoom.GetAttribute("id"); //http://msdn.microsoft.com/en-us/library/acwfyhc7.aspx } if( xmlRoom.hasAttribute("description") ) { roomDescription = xmlRoom.GetAttribute("description"); } Room myRoom = new Room(roomDescription, roomID); //creates a room rooms.Add(myRoom); //adds to list with all rooms in game } foreach(XmlNode xmlNPC in xmlNPCs) { bool isMoveable = false; if( !xmlNPC.hasAttribute("id") ) { Console.WriteLine("A NPC was in the xml file, without an id attribute, correct this to spawn the npc"); continue; //skips remaining code in loop } XmlNode inRoom = xmlNPC.getParentNode(); string roomID = inRoom.GetAttribute("id"); if( xmlNPC.hasAttribute("isMoveable") ) { string isMoveableStr = xmlRoom.GetAttribute("isMoveable"); if( isMoveableStr == "true" ) isMoveable = true; } } }\[/code\]