Question : How to save File loaded as a String?

Hello,
We have just started a new project involving reading and writing XML with XSD Schema. We envision having an XML template matching a specific schema with data variables in it that we would populate from a database using VBA.
Our best thoughts so far are to treat the XML template as a string and simply do search/replace string operations. Our test code below is functioning except we don't know how to save the open file with the replaced data.
Could someone tell us how we can accomplish this?
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
Public Sub LoadXMLAsString()
    Dim strFile As String
    Dim intFile As Integer
        
    intFile = FreeFile
    
    Open "c:\test.xml" For Input As #intFile
       strFile = Input$(LOF(intFile), #intFile) returns LOF
      
    strFile = Replace(strFile, "template_variable", "new_data")
     'how do we save this change? 
    Close #intFile
        
End Sub

Answer : How to save File loaded as a String?

Dim outFile As Integer
outFile = FreeFile


Open "c:\Test.xml" For Output As #outfile
Print #outfile, strFile
Close #outfile
Random Solutions  
 
programming4us programming4us