D
Dave
I am trying to use the code below to set an attribute in my xml file. Below
is my code followed by the XML file:
xd.Load(XMLFileName)
xd.GetElementsByTagName("Setting3").Item(0).Attributes("Value").InnerText =
"303" 'Here is where I am getting an error
xd.Save(XMLFileName)
--------------------------------------------------------
<configuration>
<Section Name="Settings">
<Key Name="Setting1" Value="101"></Key>
<Key Name="Setting2" Value="202"></Key>
<Key Name="Setting3" Value="300"></Key>
<Key Name="Setting4" Value="404"></Key>
</Section>
</configuration>
Can anybody give me a hand on this one? Thanks,
-Dave
is my code followed by the XML file:
xd.Load(XMLFileName)
xd.GetElementsByTagName("Setting3").Item(0).Attributes("Value").InnerText =
"303" 'Here is where I am getting an error
xd.Save(XMLFileName)
--------------------------------------------------------
<configuration>
<Section Name="Settings">
<Key Name="Setting1" Value="101"></Key>
<Key Name="Setting2" Value="202"></Key>
<Key Name="Setting3" Value="300"></Key>
<Key Name="Setting4" Value="404"></Key>
</Section>
</configuration>
Can anybody give me a hand on this one? Thanks,
-Dave