Imports System
Imports System.Xml
Imports System.Xml.XPath
Public Class MainClass
Public Shared Sub Main()
Dim root As XElement =
Dim att2 As XAttribute = root.Attribute("Att2")
Dim v2 As Nullable(Of Integer)
If att2 Is Nothing Then
v2 = Nothing
Else
v2 = Int32.Parse(att2.Value)
End If
Console.WriteLine("v2:{0}", IIf(v2.HasValue, v2, "attribute does not exist"))
End Sub
End Class