I have an XML file as follows
<abc>
<property>
<Recentlyopenedfiles>
<File Path="c:\hai.txt" />
<File Path="C:\old.java" />
</Recentlyopenedfiles>
</property>
</abc>
I am using jdom2 SAXBuilder to parse the xml in java.I need to save all recently opened files in <Recentlyopenedfiles>
. At the maximum this has to hold only three paths(i.e) 3 recently opened files path.
So,I need to know
- Are there any mechanism to set limit to child nodes?
- How to index child and perform stack operation so that last opened file saved in first file path.
Thanks.