Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.Xml
- Imports System.Linq
- Public Class Form1
- Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
- Dim xdoc = <?xml version="1.0" encoding="utf-8" standalone="yes"?>
- <Table>
- <Settings>
- <Main_Title>Test Launcher</Main_Title>
- <Product_name>Product 1</Product_name>
- <Product_price>1000</Product_price>
- </Settings>
- <Settings>
- <Product_id>2</Product_id>
- <Product_name>Product 2</Product_name>
- <Product_price>2000</Product_price>
- </Settings>
- <Settings>
- <Product_id>3</Product_id>
- <Product_name>Product 3</Product_name>
- <Product_price>3000</Product_price>
- </Settings>
- <Settings>
- <Product_id>4</Product_id>
- <Product_name>Product 4</Product_name>
- <Product_price>4000</Product_price>
- </Settings>
- </Table>
- Dim query =
- (
- From T
- In xDoc...<Settings>
- Select Title = T.<Main_Title>.Value, Name = T.<Product_name>.Value, Price = T.<Product_price>.Value
- ).
- ToList
- For Each Item In query
- MessageBox.show($"[{Item.title}] [{Item.name}] [{Item.price}]", Item.price)
- Next
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement