XNamespace.NamespaceName Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the Uniform Resource Identifier (URI) of this namespace.
public:
property System::String ^ NamespaceName { System::String ^ get(); };
public string NamespaceName { get; }
member this.NamespaceName : string
Public ReadOnly Property NamespaceName As String
Property Value
A String that contains the URI of the namespace.
Examples
The following example shows how to use this property:
string markup =
@"<aw:Root
xmlns:aw='http://www.adventure-works.com'/>";
XElement root = XElement.Parse(markup);
Console.WriteLine(root.Name.Namespace.NamespaceName);
Imports <xmlns:aw="http://www.adventure-works.com">
Module Module1
Sub Main()
Dim aw As XNamespace = GetXmlNamespace(aw)
Dim root As XElement = <aw:Root/>
Console.WriteLine(root.Name.Namespace.NamespaceName)
End Sub
End Module
This example produces the following output:
http://www.adventure-works.com
Applies to
See also
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET