ciao, sto impazzendo

ho LA MIA bella funzione che mi legge il mio file . . . se è vuoto mi da errore xke?

come faccio ad aggirare il problema?

Dim strLinea, FileObject, Instream, strFile, intTipo
strFile = Server.MapPath("database.xml")
intTipo = 1 ' lettura
' creo l'oggetto
Set FileObject = Server.CreateObject("Scripting.FileSystemObject")
' apro il file
Set InStream = FileObject.OpenTextFile(strFile, 2)
' leggo tutte le linee
Do While Not InStream.AtEndofStream
strLinea = InStream.ReadLine
if(strLinea <> "") then

InStream.WriteBlankLines(0)

end if
Loop
InStream.close

e poi qui sotto genero il file xml . . .

set sql = conn.Execute("SELECT * FROM prodotto")

set root = MyXML.createElement("root")


Do While not sql.EOF

ecc ecc e mi da questo errore:

msxml3.dll error '800a0036'

XML document must have a top level element.

/Roberto/asp_xmldom/prova.asp, line 33

e si riferisce a:

Do While Not InStream.AtEndofStream
strLinea = InStream.ReadLine
if(strLinea <> "") then

InStream.WriteBlankLines(0)

end if
Loop

come mai???? helpmy