Hi,
I started using the Xml classes of the .net framework. For my class I need a way to validate the existent DOM. This should happen when the XML file is loaded and also when new nodes are inserted into the DOM. The first part could be covered by XmlValidatingReader which is already working for me by the help of the Reg Event Callback node from LabVIEW. The second part seems to be more difficult. I'm operating on an instance of XmlDocument which provides a function Validate. It requires a parameter of the type ValidationEventHandler. I want to use the same callback VI from XmlValidationReader (see attached image). Looking at the C++ code you can see following:
ValidationEventHandler eventHandler = new ValidationEventHandler(ValidationEventHandler);
document.Validate(eventHandler);
static void ValidationEventHandler(object sender, ValidationEventArgs e)
{
...
}
The Validate funcion requires an instance of ValidationEventHandler which is constructed with the pointer to the callback function. Using the same way in LabVIEW shows me a constructor with two parameters? Why that? How can I assign my already existing callback VI to the new ValidatingEventHandler instance? I cannot find a way.
Regards
Henrik