public abstract string GetAttribute(string name, string namespaceURI);
public static bool parseFromFile(Entity entity, XmlReader reader) { // Fill info into provided entity string tag; int id, x, y; try { id = int.Parse(reader.GetAttribute("id")); x = int.Parse(reader.GetAttribute("x")); y = int.Parse(reader.GetAttribute("y")); tag = reader.GetAttribute("tag"); } catch (Exception err) { Console.WriteLine(err.Message); return false; } entity.id = id; entity.tag = tag; entity.x = x; entity.y = y; return true; }