Looks like you're trying to write a new xml file.
Try something like this;
Public Sub writeSettings()
Dim writer As XmlTextWriter
writer = New XmlTextWriter("settings.xml", Nothing)
writer.WriteStartDocument()
writer.Formatting = Formatting.Indented
writer.Indentation = 3
writer.WriteStartElement("settings")
writer.WriteElementString("timeout", settingTimeout)
writer.WriteElementString("useProxy", useProxy)
writer.WriteElementString("proxyAddress", proxyAddress)
writer.WriteElementString("proxyPort", proxyPort)
writer.WriteElementString("useProxyAuthentication", useProxyAuthentication)
writer.WriteElementString("proxyUsername", proxyUsername)
writer.WriteElementString("proxyPassword", proxyPassword)
writer.WriteElementString("proxyDomain", proxyDomain)
writer.WriteEndElement()
'writer.WriteEndElement()
writer.Flush()
writer.Close()
writer = Nothing
End Sub