我们可以使用XMLHttpRequest对象和POST方法发送一个XML文档给Web服务器。该对象为HTTP服务器提供了客户端协议支持,允许在Web服务器上发送和接受MS XMLDOM对象。XMLHttpRequest是Internet Explorer 5内置的COM对象(不需要定制安装),并且发送完毕后无需转换页面。
允许脚本和ActiveX对象。该设置允许浏览器执行类似 "myobj = new activexobject(...)"的 JScript语句; 必须允许穿越域访问数据源。这个设置允许在客户端使用Stream对象。还必须在服务器和客户端都安装MS XML DOM 3.0 和MDAC 2.5 。
References
Read Tiago Halm's article about traditional file-upload processing at http://www.15seconds.com/Issue/001003.htm For a description of the data types supported by MS XML parser, see http://msdn.microsoft.com/library/psdk/xmlsdk/xmls1cbp.htm and http://msdn.microsoft.com/library/psdk/xmlsdk/xmls3z1v.htm A sample of creating an XML document with binary data in VB is available at http://support.microsoft.com/support/kb/articles/Q254/3/88.ASP For a Microsoft reference on the ADO Stream object, see http://msdn.microsoft.com/library/psdk/dasdk/mdao1ajx.htm . Another sample for managing BLOB and binary files can be found at http://support.microsoft.com/support/kb/articles/Q258/0/38.ASP.
About the Author
Marco Nanni is an Italian Web developer with experience in (D)HTML and XML technology used for implementing enterprise solutions. Marco can be contacted at: mnanni@lycos.it.