Hello, I have a file I saved as an XML file and want different parts of the file to display in two text boxes. What is happening is the whole content of the file displays in a textbox as: [CODE] <?xml version="1.0" encoding="utf-16"?> <text> h hkj </text>[/CODE] ...in both text boxes but I want individual parts to go into each file. This is the content inside the file: [CODE] <test> //gibberish text :) h hkj </test> [/CODE] And this is the code for the XML: [CODE] StringBuilder output = new StringBuilder(); // Create an XmlReader using (XmlTextReader xmlString = new …

Member Avatar
Member Avatar
+0 forum 2

Hey all, I have a problem to read a XML file using XmlReader. I have this code: [CODE] Dim xCount As Integer = 0 Using xReader As XmlReader = XmlReader.Create("tekno.xml") TreeView1.Nodes.Clear() Do While xReader.Read() With TreeView1 .Nodes.Add(xReader.Item("title")) .Nodes(xCount).Nodes.Add("(link: " & xReader.Item("link") & ")") .Nodes(xCount).Nodes.Add("Date: " & xReader.Item("pubDate")) .Nodes(xCount).Nodes.Add(xReader.Item("description")) xCount = xCount + 1 End With Loop TreeView1.ExpandAll() End Using [/CODE] And the file .XML named ‘tekno.xml’: [CODE] <?xml version="1.0" encoding="iso-8859-1"?> <rss version="2.0"> <channel> <item> <title>Tablet Windows Tak Akan Dukung Flash</title> <link>http://tekno.kompas.com/read/2011/09/20/11432939/Tablet.Windows.Tak.Akan.Dukung.Flash</link> <pubDate>Tue , 20 Sep 2011 11:43:29 +0000</pubDate><description>&lt;img src=&quot;http://stat.k.kidsklik.com/data/photo/2011/09/16/1430299t.jpg&quot; align=&quot;left&quot; hspace=&quot;7&quot; width=&quot;120&quot; height=&quot;90&quot;&gt;Pengguna perangkat tablet yang menggunakan Windows 8 bakal …

Member Avatar
+0 forum 0

The End.