I have XML file given below.


<?xml version="1.0" encoding="UTF-8"?>
<xml>
<imp_news>
<news comp="IBM" skill="JAVA-PCM">
<headline>line1
</headline>
<description>Document1
</description>
</news>
<news comp="Dell" skill="ERP-SAP">
<headline>line2
</headline>
<description>Document2
</description>
</news>
<news comp="Infy" skill="BI-ETL-SEIBEL">
<headline>line3
</headline>
<description>Document2
</description>
</news>

</imp_news>
</xml>



My question is :

How to parse it using java and print the elements of the file based on attributes of each tag for 10 secoonds using a timer class ...

I mean first It should display First tag details(IBM ) here then after 10sec delay the next tag attribute data should be displayed.