I have a very large XML file from a legacy software. Its size is something about 9 GB.
I need to get parts of this XML in a lazy way, just like Hibernate does with databases. I already have POJOs in hierarchical structure to represent the records inside the XML and want to retrieve data from XML from POJO's 'get' methods since I have the Root element. Of course I can create a Manager class or sort of, but I want the same as the Hibernate does with lazy load.
Is there any pattern or library that could be used to change the behavior of a class method, exactly as Lazy Load in Hibernate?