主要语句
xmlHttp.open("POST", "receive.aspx?type=xmlsave", true);
xmlHttp.send(xmlDoc);
代码
receive.aspx.cs
System.IO.Stream instream = Page.Request.InputStream;
BinaryReader br = new BinaryReader(instream, System.Text.Encoding.UTF8);
byte[] byt = br.ReadBytes((int)instream.Length);
string sXml = System.Text.Encoding.UTF8.GetString(byt); System.Xml.Xmldocument xmlDoc = new System.Xml.Xmldocument();
xmlDoc.LoadXml(sXml);
xmlDoc.Save(Server.MapPath("note.xml")); Response.Write("save");
以上就是XML学习(三) js保存xml的示例代码分享的详细内容,更多请关注考高分网其它相关文章!



