This documentation is archived and is not being maintained.

XmlNodeEventArgs.NodeType Property

Gets the type of the XML node being deserialized.

[Visual Basic]
Public ReadOnly Property NodeType As XmlNodeType
public XmlNodeType NodeType {get;}
public: __property XmlNodeType get_NodeType();
public function get NodeType() : XmlNodeType;

Property Value

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.


[Visual Basic, C#, C++] The following example prints a description of the unknown node that caused the UnknownNode event to occur.

[Visual Basic] 
Protected Sub serializer_UnknownNode _
    (ByVal sender As Object, _
     ByVal e As XmlNodeEventArgs)
        Dim myNodeType As XmlNodeType = e.NodeType
    End Sub

protected void serializer_UnknownNode
(object sender, XmlNodeEventArgs e)
   XmlNodeType myNodeType = e.NodeType;

void serializer_UnknownNode(Object* /*sender*/, XmlNodeEventArgs* e)
   XmlNodeType myNodeType = e->NodeType;

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

XmlNodeEventArgs Class | XmlNodeEventArgs Members | System.Xml.Serialization Namespace | Deserialize | XmlSerializer