Hi, i have a XML file as given below: <main> <ele id="1">C:\My Documents\data1.txt"> <ele id="2">C:\My Documents\da2.txt"> </main> the text files contains some names and a number for each name like sam 29 chris 32 etc i want the pseudo-code using which i can use a servlet to extract the data present in the files "data1.txt" and "da2.txt" and then perform calculations on them like multiplying the values in the text files. thanks in advance
Joined: Jul 18, 2002
Step1. Use SAX parser for reading the path from XML file step2. Read files using java.io package....
It is impossible to make anything foolproof because fools are so ingenious..Murphy<br />Basu.
Joined: Oct 12, 2000
Why use SAX when DOM is a lot easier to use? I know SAX is a bit more memory efficient but unless you're loading megabytes of data at a time that doesn't matter and the faster coding when using DOM more than pays for itself.
author and deputy
Joined: Jul 13, 2001
For me DOM working great even for xml file which is 1855kb, but I am using MSXML parser No 100% CPU usage and very fast.