This is my first positing on the forum and i am new to Java Programming. I have been using XPath API to parse for some tags in the XML file and write it to the file using File Reader/Writer. The problem is that this line of code:- String result = xPath.evaluate("/su/@id", new InputSource(new FileReader("/net/7.1_TESTFIX_CQ/nt_i386/ShareableEntities/"+j1))); returns string. I want to write this to a string so that i can write this to a file. So write now the text file myfile.txt only has one entry which is the last entry, where as it should have more than 100 entries. How do i do that. I am copying the method. Help is very appreciated!!!
The suggestion you gave me, i could find a work around with that, so what i did, i wrote i different method which stored the path to the XML file in the text file. I modified this method i posted above to get the valie from the "id" attribute and store it the the test file sucessfully.