XmlNodeEventArgs::NodeType Property

 

Gets the type of the XML node being deserialized.

Namespace:   System.Xml.Serialization
Assembly:  System.Xml (in System.Xml.dll)

public:
property XmlNodeType NodeType {
	XmlNodeType get();
}

Property Value

Type: System.Xml::XmlNodeType

The XmlNodeType that represents the XML node being deserialized.

The XmlNodeType enumeration returns a description of the node being deserialized. For example, it returns "Comment" if the node is a comment.

The following example prints a description of the unknown node that caused the UnknownNode event to occur.

private:
   void serializer_UnknownNode( Object^ /*sender*/, XmlNodeEventArgs^ e )
   {
      XmlNodeType myNodeType = e->NodeType;
      Console::WriteLine( myNodeType );
   }

.NET Framework
Available since 1.1
Return to top
Show: