// called from constructor function itemId = inventoryNode.Attributes["ItemId"].Value; // this works item = inventoryNode["Item"].InnerText; // returns error notes = inventoryNode["Notes"].InnerText; //returns error photoPath = inventoryNode["PhotoPath"].InnerText;// this works