combit List & Label 24 - .NET Online Web Help
PreParseXPathNavigator Event
Example 


combit.ListLabel24.DataProviders Namespace > XmlDataProvider Class : PreParseXPathNavigator Event
Allows to override the default data type parsing behavior.
Syntax
'Declaration
 
Public Event PreParseXPathNavigator As EventHandler(Of PreParseXPathNavigatorEventArgs)
public event EventHandler<PreParseXPathNavigatorEventArgs> PreParseXPathNavigator
public:
event EventHandler<PreParseXPathNavigatorEventArgs^>^ PreParseXPathNavigator
Event Data

The event handler receives an argument of type PreParseXPathNavigatorEventArgs containing data related to this event. The following PreParseXPathNavigatorEventArgs properties provide information specific to this event.

PropertyDescription
XPathNavigator  
Current content of the node.  
Automatically parsed data type.  
Skip default processing.  
Example
XmlDataProvider provider = new XmlDataProvider(xmlDocument);
provider.PreParseXPathNavigator += new EventHandler<PreParseXPathNavigatorEventArgs>(provider_PreParseXPathNavigator);
...
void provider_PreParseXPathNavigator(object sender, PreParseXPathNavigatorEventArgs e)
{
    if (e.Navigator.Name == "ZIP")
    {
        e.ParsedType = typeof(string);
        e.ParsedContent = e.Navigator.ValueAs(typeof(string));
        e.SkipDefaultProcessing = true;
    }
}
Private Sub provider_PreParseXPathNavigator(sender As Object, e As PreParseXPathNavigatorEventArgs)
	If e.Navigator.Name = "ZIP" Then
		e.ParsedType = GetType(String)
		e.ParsedContent = e.Navigator.ValueAs(GetType(String))
		e.SkipDefaultProcessing = True
	End If
End Sub
Requirements

Platforms: Windows Vista - Windows 10 Version 1809, Windows Server 2008 - 2016

See Also