I made the erroneous assumption that you were using your own XML creation code. The LabVIEW write to XML file VI overwrites the file every time. You can get around this behavior in a couple of ways.
- Create your own write to XML VIs using the LabVIEW one as your base. The LabVIEW one write a header, writes your data, then writes the end tag. Split this up so that you open the file and write the header before your loop. During the loop, write your data. Write the end tag and close the file when you exit the loop. Don't overwrite the LabVIEW vi.lib function, or you will probably regret it. Copy it to a different location before you start your modifications.
- Use the LabVIEW write to XML file for the first write of the loop. This will give you a file with a header and your first set of data. Still in the first loop iteration, reopen the file and position the file pointer on the start of the end tag (</LVData>). In subsequent loop operations, flatten your data to XML and write to the file directly using the file write primitive. When you exit your loop, write an end-of-line character and the end tag "</LVData>" and close the file.
If you need more detailed help on either of the above methods, let me know.
Out of curiosity, why are you saving your data as XML? There may be a better way to do it, depending on your application.