<?xml version='1.0' encoding='UTF-8'?>
<eveapi version="2">
<result>
<rowset name="typeids" key="typeID" columns="typeName,TypeID">
<row typeName="Construction Blocks" typeID="3828" />
</rowset>
</result>
</eveapi>
Currently I am trying to get the value of the typeID
attribute from this xml using this code:
var result = from el in doc.Elements("row")
where (string)el.Attribute("typeName") == "Construction Blocks"
select el.Attribute("typeID").Value;
foreach (string el in result)
{
typeID.Add(Convert.ToInt32(el));
}
However the foreach
statement never fires. What am I doing wrong here?
Edit: Sorry, I put in the wrong xml. Correct xml is now there