This method:
public static string[] getKeywords(string filename)
{
string[] keywords = XElement.Load(filename).Elements("Keyword").Attributes("name").Select(n => n.Value).ToArray
return keywords;
}
Will not read the xml file. I have even tested every place it was called and it led back to getKeywords. I even tested it by
string[] test = getKeywords("APIs\\cmake.xml");
textbox.Text = test[0];
And I get an ArrayIndexOutOfBounds Exception. The xml file is accessable by this method. Just that it does not read the attribute. Here is a sample of the xml file:
<Keywords>
...
<Keyword name ="if" />
<Keyword name ="else" />
...
</Keywords>
What is wrong?