I need to parse am XML file in Java and check some support based on the condition. I tried using the DOM for this.
<Config>
<Configuration>
<Descriptor>
<e id="0">
<family>Rest</family>
<supportedList>
<_length>5</_length>
<_type>TypeX[]</_type>
<e id="0">value-1</e>
<e id="1">value-2</e>
<e id="2">value-3</e>
<e id="3">value-4</e>
<e id="4">value-5</e>
</supportedList>
</e>
<e id="1">
<family>Rest1</family>
<supportedList>
<_length>5</_length>
<_type>TypeX[]</_type>
<e id="0">value1-1</e>
<e id="1">value1-2</e>
<e id="2">value1-3</e>
<e id="3">value1-4</e>
<e id="4">value1-5</e>
</supportedList>
</e>
</Descriptor>
</Configuration>
</Config>
In the above XML file,I need to go through the "e" block and then Descriptor block, and then search for Family - Rest1 and then iterate through supportedList. Check if supportedList contains user provided value if it exists then return true.
I tried using a DOM parser but I am not able to parse the file properly. The actual XML file that I am working on, is of 20K lines and has too much data. Any easy solution on this.