客户端发送数据,接收返回的XML文件<script language=javascript>// 发送数据请求var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");xmlHttp.open("post","TransactAutoNo.aspx",false);var strXML = "<AutoNo value ='Test'>tomato</AutoNo>";xmlHttp.send(strXML); // 接收服务器返回的XML数据var xmlDoc = new ActiveXObject("Microsoft.XMLDOM") ;xmlDoc.loadXML(xmlHttp.responseXML.xml);var autoNoResult = xmlDoc.selectSingleNode("//AutoNo").attributes("value"); </script>服务器端处理求情,并返回XML文件// 接收请求页面传递过来的XML信息Response.Expires = -1000;XmlDocument xmlDoc = new XmlDocument();xmlDoc.Load(Request.InputStream);string strXml = xmlDoc.DocumentElement.GetAttribute("value"); XmlDocument xmlResult = new XmlDocument();string xml = "<AutoNo value='测试成功' />";xmlResult.LoadXml(xml);Response.ContentType = "text/xml";xmlResult.Save(Response.OutputStream);