zoukankan      html  css  js  c++  java
  • 生成xml

    <%
    bitFileExists=true
    Dim   strFilename,strXMLFile
      strFilename   =   "test.xml "
      strXMLFile=server.mapPath(strFilename)
      set   oXML   =   server.createObject( "Microsoft.XMLDOM ")
      oXML.async   =   False
      'oXML.load(strXMLFile)
      'oXML.loadXML   " <?xml   version= " "1.0 " "   encoding= " "gb2312 " "   ?> "
      If   bitFileExists   Then
        set   oXMLf=oXML.appendChild(oXML.createElement( "Server1 "))
        set   oXMLs2=oXMLf.appendChild(oXML.createElement( "Server2 "))
      End   If
      for   i=0   to   9
      set   oXMLRec   =   oXMLs2.appendChild(oXML.createElement( "Host "))
      Set   hostnameAtt   =   oXML.createAttribute( "id ")
      hostnameAtt.Text   =   i
      oXMLRec.attributes.setNamedItem   hostnameAtt
      next
     
      set   oProcess=oXML.createProcessingInstruction( "xml ",   "version= '1.0 '   encoding= 'gb2312 ' ")
      oXML.insertBefore   oProcess,oXML.childnodes(0)
     
      oXML.save   strXMLFile
      set   oXML   =   nothing

    %>

  • 相关阅读:
    Word批量转PDF或者图片
    sqlite3数据c/c++接口编程<linux,window>
    静态库和动态库
    QT信号和槽
    C程序编译过程
    Volatile关键字
    端口复用setsockopt
    深入理解epoll(转载)
    临时变量
    json学习随笔
  • 原文地址:https://www.cnblogs.com/hateyoucode/p/1750649.html
Copyright © 2011-2022 走看看