Hi Nikhill, There is probably a much nicer way of doing it, but the simplest approach for me would be to parse the original xml file, extracting the information you require and placing it in a queue ADT like a linked list or similar structure. Then create a new file and write the information from the queue, element by element to the new file. Hope that helps,
Those two XML documents look identical to me. But maybe they aren't and I just haven't seen the differences.
So instead of just dumping some examples here and asking us to analyze them for you, how about if you do some of the analysis? For example: what is different between the two documents? What are the features of the first document that map into features of the second document? Basic things like that.
posted 13 years ago
Hey Paul...maybe if you had gone through the tiny samples of xml that I had 'dumped' then you might have spotted the differences.The difference between the 2 xmls is that the first has the name and value elements of Nikhil's and Navin's account and balance within formfield tags jumbled up whereas the second xml has Nikhil's account and Nikhil's balance one below the other and similarly with Navin's account and balance.And by the way I am on with my own analysis but it is also better to put one's queries on forums like these as this forum is meant for posting ones doubts...I don't think there is any harm in doing so and getting some inputs from the knowledge pool all over the world.A newbie to xml parsing like me would get some foothold with help from here. [ September 25, 2007: Message edited by: Nikhil Sun ]
I looked at those XML samples carefully, twice, and I didn't see any differences. Now that you point them out, I can see them. Which is why I suggested in my earlier post that you could have explained the difference to start with.
Anyway, I'm glad you are on your way. If you get stuck, then don't hesitate to ask here. With full details, of course, next time.
Whip out those weird instruments of science and probe away! I think it's a tiny ad: