Home  >  Article  >  Backend Development  >  Detailed tutorial on how to use Ajax to deliver Xml documents

Detailed tutorial on how to use Ajax to deliver Xml documents

巴扎黑
巴扎黑Original
2017-05-21 18:30:321362browse

Client


Server side (test.cs)

System.IO.Stream stream = Request.InputStream 
System.Xml.XmlDocument doc = new XmlDocument();  
try  
{  
  doc.Load(stream); //加载发送过来的Xml文档 
}  
catch  
{  
  byte[] buffer = new byte[stream.Length];  
  stream.Read(buffer,0,buffer.Length);  
  string strXML = System.Text.UnicodeEncoding.Default.GetString(buffer,0,buffer.Length);  
  doc.LoadXml(strXML);  
}  
//将doc处理后输出以便返回到客户端(此处省略) 
response.write("")

The above is the detailed content of Detailed tutorial on how to use Ajax to deliver Xml documents. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn