Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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:
© 2017 Microsoft