WUFI and C++

Hi There,
I have been writing a program with C++ that can combine a series of randomly generated numbers and place them in an existing xml file.

I have generated the random files, no problem with that; however, I have a question regarding how to open a xml file which has around 3000 lines then go to the line that I want and replace the line with a new input and save it. I have also tried, writing the xml file in a binary mode using C++, but the problem that I have with this scenario is that WUFI( the program that is reading the file cannot read it since some characters are mismatched. So, I decided to open the template file and rewrite only the sections that are needed then save it again.
So if you can helo me its appreciated. I have placed part of the xml file below:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="wufi1d.xslt"?>
<WUFI1D>
<SystemUnitID>0</SystemUnitID>
<VersionID>0</VersionID>
<FileVersionID>53</FileVersionID>
<ProgVersion>5.2.0.935</ProgVersion>
<MaxCaseID>1</MaxCaseID>

Topic archived. No new replies allowed.