XName.Namespace Property gets the namespace part of the fully qualified name.
Imports <xmlns="http://www.domain.com">
Imports System
Imports System.Xml
Imports System.Xml.Schema
Module Module1
Sub Main()
Dim root As XElement = <Root/>
Console.WriteLine(root.Name)
Console.WriteLine(root.Name.LocalName)
Console.WriteLine(root.Name.Namespace)
End Sub
End Module
Related examples in the same category