I have an XML file, which contains rules for code analyzer (to search vulnerabilities). So, it has very different rules like parameter, parameter count, any parameter type, const value and etc for method call (to detect specific calls), rules to detect some imports, inheritance and so on. But how to store this inside my program? I found two ways:
- Parse xml while scanning (to internal representation)
- Create classes for each element: parameter, parameter value, number of parameters
Is there a real life example of implementing this thing? Or you may just say the best/common way to do this