XML Reader
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
1 post
Page 1 of 1
Hello,
I'm going to learn how to make an easy XML reader:
XML file
Xml Writer Tutorial
I'm going to learn how to make an easy XML reader:
XML file
Code: Select all
Then first of all make sure u put:
<products>
<product>
<id>1</id>
<name>Ipod Touch 4</name>
<price>200</price>
<btw>21</btw>
</product>
<product>
<id>2</id>
<name>Itunes Store Card €15</name>
<price>15</price>
<btw>21</btw>
</product>
</products
Code: Select all
at the top then dim the document and a node:
Imports System.XML
Code: Select all
Then we are going to load the document:
Dim XmlDoc As New XmlDocument
Dim XmlNode As XmlNode
Code: Select all
then for example if the form load it must give each Product in a listbox then do:
XmlDoc.load("Products.xml")
Code: Select all
then if you want more details example like the MMDC6 u can show up a new form and give details:
For Each XmlNode In XmlDoc.SelectNodes("//product")
ListBox1.Items.Add(XmlNode.SelectSingleNode("name").InnerText
Next)
Code: Select all
Project Source:
Greeets Kieken XmlNode = XmlDoc.SelectSingleNode("/products/product[name='" & Form1.ListBox1.SelectedItem & "']")
Label1.Text = XmlNode.SelectSingleNode("id").InnerText
Label2.Text = XmlNode.SelectSingleNode("name").InnerText
Label3.Text = XmlNode.SelectSingleNode("price").InnerText & " EUR"
Label4.Text = XmlNode.SelectSingleNode("btw").InnerText & " %"

Xml Writer Tutorial
You do not have the required permissions to view the files attached to this post.
1 post
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023