I am trying to read string (<skins>whiteaero.png</skins>) from the xml file.
XML file:
<?xml version="1.0" encoding="utf-8"?>
<Settings>
<username>nothing to see</username>
<password>nothing to see</password>
<server>nothing to see</server>
<port>nothing to see</port>
<isactive>1</isactive>
<skins>whiteaero.png</skins>
</Settings>
Here is the code I am using:
private void alert_Load(object sender, EventArgs e)
{
XmlTextReader reader = new XmlTextReader("settings.xml");
reader.ReadStartElement();
string sk = reader.ReadElementString("skin");
reader.Close();
How would I make it read line 8 (<skins>whiteaero.png</skins>) of the XML file?
Question
Guest Dan C
Hey,
I am trying to read string (<skins>whiteaero.png</skins>) from the xml file.
XML file:
Here is the code I am using:
private void alert_Load(object sender, EventArgs e) { XmlTextReader reader = new XmlTextReader("settings.xml"); reader.ReadStartElement(); string sk = reader.ReadElementString("skin"); reader.Close();How would I make it read line 8 (<skins>whiteaero.png</skins>) of the XML file?
Thanks.
Link to comment
Share on other sites
4 answers to this question
Recommended Posts