I have a large (1MB+) XML file, and I’m trying to create an object where the variables of the object equal what’s in the XML node. Currently, I just use .evaluate() for each variable, but that takes far too long (~1 sec per object, and when I’m trying to load 56 objects, I can’t wait a minute just to start up). Some parts are empty, otherwise I’d just load the node into a string and parse from there. I’m pretty new to this, what I do know how to search doesn’t result in anything useful. I’m currently using the DOM parser. What is an efficient way to load all these variables?
Share
If the XML follows some sort of established schema, I would recommend using JAXB. When you unmarshal the XML, you will end up with an object structure matching that of the XML.