以文本方式查看主题

-  计算机科学论坛  (http://bbs.xml.org.cn/index.asp)
--  『 XML基础 』  (http://bbs.xml.org.cn/list.asp?boardid=1)
----  大侠们,菜鸟求救!!!!!!!!!  (http://bbs.xml.org.cn/dispbbs.asp?boardid=1&rootid=&id=5613)


--  作者:leguan813714
--  发布时间:3/11/2004 10:10:00 AM

--  大侠们,菜鸟求救!!!!!!!!!
大侠们,菜鸟求救!!!
如何用DOM对象生成以下XML文件啊
<?xml version="1.0" encoding="gb2312" ?>
<manifest identifier="MANIFEST1">
 <metadata>
  <schema>IMS Content</schema>
  <schemaversion>1.1.3</schemaversion>
  <general>
   <title>岳阳楼记</title>
   <description>本课程讲解北宋政治家、</description>
   <keyword>北宋,范仲淹</keyword>
  </general>
  <author>
   <unit>实验中学语文教研组</unit>
   <name>柳君幸</name>
   <telephone>01-87654321</telephone>
   <email>jxliu@263.net</email>
  </author>
  <createdate>2004-2-29</createdate>
  <modifydate>2004-3-10</modifydate>
  <subject>语文</subject>
  <learner>初中3年级</learner>
 </metadata>
以下程序是我编的,目的是把以上生成的文档写到example.xml中,af.write “ ”,“”中就是
要生成的内容!!

jF=server.mappath("/PUBLIC/XSL/example.xml")

Set fs=server.CreateObject("Scripting.FileSystemObject")

if fs.FileExists(jF) then
    fs.DeleteFile jF, true
end if

Set af=fs.CreateTextFile(jF, True)

af.write “ ”
af.close

谢谢!!!!!!!!!!


W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
46.875ms