I want to edit a xml file with my vb program, I have no problems finding the right nod.
But when I try to set my textbox values as childnodes I'm getting the error:
Conversion from string "artikel" to type 'Integer' is not valid.
The textboxes ain't empty, there is just a normal word in it (mompel).
I tried
as well, but it gave me the same error.
What am I doing wrong here?
But when I try to set my textbox values as childnodes I'm getting the error:
Conversion from string "artikel" to type 'Integer' is not valid.
The textboxes ain't empty, there is just a normal word in it (mompel).
Code:
If nod IsNot Nothing Then
nod.ChildNodes("artikel").InnerText = TextBox1.Text
nod.ChildNodes("titel").InnerText = TextBox2.Text
nod.ChildNodes("prijs").InnerText = TextBox3.Text
nod.ChildNodes("foto1").InnerText = TextBox4.Text
nod.ChildNodes("foto2").InnerText = TextBox5.Text
nod.ChildNodes("foto3").InnerText = TextBox6.Text
nod.ChildNodes("foto4").InnerText = TextBox7.Text
nod.ChildNodes("foto5").InnerText = TextBox8.Text
nod.ChildNodes("foto6").InnerText = TextBox9.Text
nod.ChildNodes("foto7").InnerText = TextBox10.Text
nod.ChildNodes("foto8").InnerText = TextBox11.Text
nod.ChildNodes("omschrijving").InnerText = TextBox12.Text
Else
MessageBox.Show("Not found", "not found", MessageBoxButtons.OK, _
MessageBoxIcon.Information)
End IfCode:
nod.ChildNodes("artikel").InnerText = TextBox1.Text.ToStringWhat am I doing wrong here?