store xml in java data structure

Define a java data structure to store n number of files as defined below note that each file may contain millions of tags and each tag may contain millions of subtags.


the aim of ds should be such that a particular tag can be easily retrieved from a particular file or from all the files in which that tag exists.

File 1 // this is just a sample structure

<tag1>
       <subtag1>
             <subsubtag1>
             </subsubtag1>
       </subtag1>
       <subtag2>
       </subtag2> 
</tag1> 
<tag2> 
</tag2>