public abstract GetAttribute ( string name, string namespaceURI ) : string | ||
name | string | |
namespaceURI | string | |
return | string |
public abstract string GetAttribute(string name, string namespaceURI);
XmlReader::GetAttribute ( int i ) : string | |
XmlReader::GetAttribute ( string name ) : string |
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; }