Javascript 中调用MS保存格式化的XML文档

来源:互联网 发布:小苍淘宝店 编辑:程序博客网 时间:2024/06/11 23:25

原文地址:http://www.tkachenko.com/blog/archives/000327.html

<html>   <head>      <title>MXXMLWriter sample.</title>      <script type="text/javascript">      var reader = new ActiveXObject("Msxml2.SAXXMLReader.4.0");      var writer = new ActiveXObject("Msxml2.MXXMLWriter.4.0");              writer.indent = true;      writer.standalone = true;      reader.contentHandler = writer;                  reader.putProperty("http://xml.org/sax/properties/lexical-handler", writer);      reader.parseURL("source.xml");      alert(writer.output);                 </script>   </head>   <body>      <p>MXXMLWriter sample.</p>   </body></html>

原创粉丝点击