I've received help regarding this area but with a much simpler example:
<Andromeda>
<Name>Andromeda</Name>
<Backstory>The star-born celestial known as Andromeda is a stranger to Newerth. With no memory of her home or her people, she is driven merely by an innate sense that the hellbourne are vile and the mortal inhabitants of Newerth innocent. Her powerful dimensional magic allows her to bring destruction to the daemons or strength to her new-found allies.</Backstory>
<HeroType>Agility</HeroType>
<Damage>39-53</Damage>
<Armor>3.1</Armor>
<MoveSpeed>295</MoveSpeed>
<AttackType>Ranged(400)</AttackType>
<AttackRate>.75</AttackRate>
<Strength>16</Strength>
<Agility>27</Agility>
<Intelligence>15</Intelligence>
<Icon>Images/Hero/Andromeda.gif</Icon>
<IconGlow>Images/Hero/gAndromeda.gif</IconGlow>
<GamePicture>Images/Hero-InGame/Andromeda.png</GamePicture>
<DotaVersion>Shendelzare Silkwood the Vengeful Spirit</DotaVersion>
</Andromeda>
And to retrieve info, I just use this code:
public List<string> LoadHeroInformation(string NameOfHero)
{
List<string> Info = new List<string>();
Info.Add(HeroInformation.Descendants(NameOfHero).Single().Element("Name").Value);
Info.Add(HeroInformation.Descendants(NameOfHero).Single().Element("Backstory").Value);
Info.Add(HeroInformation.Descendants(NameOfHero).Single().Element("HeroType").Value);
Info.Add(HeroInformation.Descendants(NameOfHero).Single().Element("Damage").Value);
Info.Add(HeroInformation.Descendants(NameOfHero).Single().Element("Armor").Value);
Info.Add(HeroInformation.Descendants(NameOfHero).Single().Element("MoveSpeed").Value);
Info.Add(HeroInformation.Descendants(NameOfHero).Single().Element("AttackType").Value);
Info.Add(HeroInformation.Descendants(NameOfHero).Single().Element("AttackRate").Value);
Info.Add(HeroInformation.Descendants(NameOfHero).Single().Element("Strength").Value);
Info.Add(HeroInformation.Descendants(NameOfHero).Single().Element("Agility").Value);
Info.Add(HeroInformation.Descendants(NameOfHero).Single().Element("Intelligence").Value);
Info.Add(HeroInformation.Descendants(NameOfHero).Single().Element("DotaVersion").Value);
return Info;
}
Now I have a much more complex XML file and I have no idea how to retrieve it. Care to help StackOverflow?
Here's the XML file:
<Andromeda>
<SpellOne>
<Name>Comet</Name>
<Icon>Images/Spell/Andromeda/Spell1.gif</Icon>
<Action>Target Unit</Action>
<Description>Andromeda rips a comet from her dimension to hurl at an enemy, damaging and stunning them.</Description>
<Ranks>
<First>
<ManaCost>95</ManaCost>
<Cooldown>10 Seconds</Cooldown>
<Effects>Deals 100 Magic damage and stuns target for 1.75 seconds.</Effects>
<ExtraEffects></ExtraEffects>
</First>
<Second>
<ManaCost>110</ManaCost>
<Cooldown>10</Cooldown>
<Effects>Deals 175 Magic damage and stuns target for 1.75 seconds.</Effects>
<ExtraEffects></ExtraEffects>
</Second>
<Third>
<ManaCost>125</ManaCost>
<Cooldown>10</Cooldown>
<Effects>Deals 250 Magic damage and stuns target for 1.75 seconds.</Effects>
<ExtraEffects></ExtraEffects>
</Third>
<Fourth>
<ManaCost>140</ManaCost>
<Cooldown>10</Cooldown>
<Effects>Deals 325 Magic damage and stuns target for 1.75 seconds.</Effects>
<ExtraEffects></ExtraEffects>
</Fourth>
</Ranks>
</SpellOne>
<SpellTwo>
<Name>Aurora</Name>
<Icon>Images/Spell/Andromeda/Spell2.gif</Icon>
<Action>Target Position</Action>
<Description>Andromeda shakes the magnetic field of Newerth, causing an Aurora to erupt, damage, and reduce the armor of all enemies in front of her.</Description>
<Ranks>
<First>
<ManaCost>40</ManaCost>
<Cooldown>15 Seconds</Cooldown>
<Effects>Deals 25 damage to targets in a line and applies Aurora for 15 seconds.</Effects>
<ExtraEffects>-5% Base Damage, -2 Armor</ExtraEffects>
</First>
<Second>
<ManaCost>40</ManaCost>
<Cooldown>15 Seconds</Cooldown>
<Effects>Deals 50 damage to targets in a line and applies Aurora for 15 seconds.</Effects>
<ExtraEffects>-10% Base Damage, -3 Armor</ExtraEffects>
</Second>
<Third>
<ManaCost>40</ManaCost>
<Cooldown>15 Seconds</Cooldown>
<Effects>Deals 75 damage to targets in a line and applies Aurora for 15 seconds.</Effects>
<ExtraEffects>-15% Base Damage, -4 Armor</ExtraEffects>
</Third>
<Fourth>
<ManaCost>40</ManaCost>
<Cooldown>15 Seconds</Cooldown>
<Effects>Deals 100 damage to targets in a line and applies Aurora for 15 seconds.</Effects>
<ExtraEffects>-20% Base Damage, -5 Armor</ExtraEffects>
</Fourth>
</Ranks>
</SpellTwo>
</Andromeda>