This is some XML I need to be able to read. I need to get the QualitySetting values for each Feature assigned to some variables:
<?xml version="1.0" encoding="UTF-8" ?>
<GraphicsConfig>
<FX>
<Off>
<LocalisationName>$QUALITY_OFF;</LocalisationName>
<Item>
<Feature>LightCones</Feature>
<QualitySetting>0</QualitySetting>
</Item>
<Item>
<Feature>LensFlares</Feature>
<QualitySetting>0</QualitySetting>
</Item>
<Item>
<Feature>Debris</Feature>
<QualitySetting>0</QualitySetting>
</Item>
<Item>
<Feature>ParticleEffects</Feature>
<QualitySetting>0</QualitySetting>
</Item>
<Item>
<Feature>Trails</Feature>
<QualitySetting>0</QualitySetting>
</Item>
<Item>
<Feature>Beams</Feature>
<QualitySetting>0</QualitySetting>
</Item>
<Item>
<Feature>Fog</Feature>
<QualitySetting>0</QualitySetting>
</Item>
</Off>
</FX>
</GraphicsConfig>
I am using XMLReader and I usually use something like:
Dim guiSettings = XElement.Load(_localAppDataFilePath & "\Frontier Developments\Elite Dangerous\Options\Graphics\GraphicsConfigurationOverride.xml")
target = guiSettings.Element("GUIColour").Elements("Default").[Single]()
r = target.Element("MatrixRed").Value
Open to doing this other ways, and if there is no easy way to do this, I am perfectly happy to just locate the <Feature> element with the appropriate name and then simply just read the very next node, but thought I'd ask as I always want to improve my XML editing knowledge.