The suggested CFIF would be unnecessary - the CFLOOP is going to handle the case of the empty document for you. Carl had most of the solution in his code, just no handling of the ELSE case for a default:
<cfif StructKeyExists(mydoc.rowset.ROW[i], "FILE_NUMBER")>
<cfset QuerySetCell(orderquery, "FILE_NUMBER", mydoc.rowset.ROW[i].FILE_NUMBER.XmlText, i)>
<cfelse>
<cfset QuerySetCell(orderquery, "FILE_NUMBER", putyourdefaultvaluehere, i)>
</cfif>
Out of curiousity, just what are you doing the with query var once you get it created? Just asking because your code looks a lot like the sample code in a lot of the CF books that demonstrate how to process an XML document, which have you creating the query var and then looping through the query to do thge real processing, rather that just loop over the document. If it's a big XML doc, you end up with a bigger memory footprint because you have both the xml var and the query var, plus the fact that the query functions have always been very poor performers. Just need to loop over the xml var.
fyi,
-reed