Q:

How to convert oracle resultset to XML in VBScript

I am using QTP to query oracle DB and getting back values to write in a text file. How to convert the result to xml so that I can write XML to the text file. 
strSQL ="select * from emp"
Set rs = objDBConn.Execute(strSQL)

to write to txt file 
Set objFSO=CreateObject("Scripting.FileSystemObject")
outFile="C:\test.txt"
Set objFile = objFSO.CreateTextFile(outFile,True)
while not rs.EOF
row = ""
first_field = true
For Each field In rs.Fields
if (first_field = true) then
  row = field
  first_field = false
else
  row = row & " " & field
end if
Next  
objFile.Write row & vbCrLf
rs.MoveNext 
wend

A:

If you are not picky about the default naming, then the quickest way would be:
select dbms_xmlgen.getxml( 'select * from emp') from dual

