m0tSiE
asked on
Populate a TextBox via XML?
Hi,
I'm busy setting up an application I made to get details from an XML file and import the details into parts of my application. At present i've managed to populate List and Combo boxes using the below code, however can anyone show me how to import details into a TextBox?
This is the code i'm using to populate List and Combo Boxes with the details in the <test> tags within my XML file.
Dim node1 As Xml.XmlNode = xmlDoc.SelectSingleNode("/ /test")
If node1 IsNot Nothing Then
For x As Integer = 0 To node1.ChildNodes.Count - 1
Me.ComboBox1.Items.Add(nod e1.ChildNo des.Item(x ).InnerTex t.ToString )
Next
End If
For the text box, it's called TextBox1 and the details I want to put in the text box are contained in the <text> tags in my XML file as shown below.
Assistant.xml
<?xml version="1.0" encoding="UTF-8"?>
<Records>
<TextBox>
<text>Description 1</text>
</TextBox>
</Records>
Many thanks,
Paul.
I'm busy setting up an application I made to get details from an XML file and import the details into parts of my application. At present i've managed to populate List and Combo boxes using the below code, however can anyone show me how to import details into a TextBox?
This is the code i'm using to populate List and Combo Boxes with the details in the <test> tags within my XML file.
Dim node1 As Xml.XmlNode = xmlDoc.SelectSingleNode("/
If node1 IsNot Nothing Then
For x As Integer = 0 To node1.ChildNodes.Count - 1
Me.ComboBox1.Items.Add(nod
Next
End If
For the text box, it's called TextBox1 and the details I want to put in the text box are contained in the <text> tags in my XML file as shown below.
Assistant.xml
<?xml version="1.0" encoding="UTF-8"?>
<Records>
<TextBox>
<text>Description 1</text>
</TextBox>
</Records>
Many thanks,
Paul.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER