我有以下 XML
<xml>
<version>1.0</version>
<products>
<product>
<name>Product 1</ProductName>
<id>1</ProductId>
</product>
<product>
<name>Product 2</ProductName>
<id>2</ProductId>
</product>
<product>
<name>Product 3</ProductName>
<id>3</ProductId>
</product>
</products>
</xml>
我有以下代码用于循环产品
Dim xelement As XElement = xelement.Load("aaa.xml")
Dim products As IEnumerable(Of XElement) = xelement.Elements()
For Each product In products
Console.WriteLine(product.Elements("name").Value)
Next product
但product.Elements("name").Value
给出错误。我在这里做错了什么?