Search code examples
liquid-xml

UnknownAttribute event for LxSerializer


Does there exist in LxSerializer something along the lines of the XmlSerializer UnknownAttribute event?

Liquid did a much better job parsing the xsd into c# code than xsd.exe did, but I need to be able to handle attributes that are not defined in the XSD. Any suggestions?


Solution

  • Yes, please see the Liquid XML Objects documentation regarding Unexpected Elements and Attributes

    If 'Handle unknown nodes' option is true, any unexpected elements and attributes will be processed and added to a generic list of XElements and XAttributes.

    If 'Handle unknown nodes' option is false, any unexpected elements and attributes will cause the error handler to be invoked.