How to efficiently parse resource instances into their suitable python classes?
What I Did
I have a bunch of XML instances that I am trying to parse. I got it working by first checking the XML root and then parsing it to the correct class like the snippet below. This, however, results in a lot of lines of code. Is there a more efficient way?
Description
How to efficiently parse resource instances into their suitable python classes?
What I Did
I have a bunch of XML instances that I am trying to parse. I got it working by first checking the XML root and then parsing it to the correct class like the snippet below. This, however, results in a lot of lines of code. Is there a more efficient way?