XmlNodeEventArgs.NamespaceURI 属性

定义

获取与正在被反序列化的 XML 节点关联的命名空间 URI。Gets the namespace URI that is associated with the XML node being deserialized.

public:
 property System::String ^ NamespaceURI { System::String ^ get(); };
public string NamespaceURI { get; }
member this.NamespaceURI : string
Public ReadOnly Property NamespaceURI As String

属性值

与正在被反序列化的 XML 节点关联的命名空间 URI。The namespace URI that is associated with the XML node being deserialized.

示例

下面的示例将打印导致 UnknownNode 事件发生的未知 XML 节点的 URI。The following example prints the URI of the unknown XML node that caused the UnknownNode event to occur.

private:
   void serializer_UnknownNode( Object^ /*sender*/, XmlNodeEventArgs^ e )
   {
      Console::WriteLine( "UnknownNode Namespace URI: {0}", e->NamespaceURI );
   }
private void serializer_UnknownNode
(object sender, XmlNodeEventArgs e)
{
   Console.WriteLine
   ("UnknownNode Namespace URI: " + e.NamespaceURI);
}
   
Private Sub serializer_UnknownNode _
                (ByVal sender As Object, _
                 ByVal e As XmlNodeEventArgs)
    Console.WriteLine("UnknownNode Namespace URI: " & e.NamespaceURI)
End Sub

适用于

另请参阅