如题

解决方案 »

  1.   

    set fso=createobject("scripting.filesystemobject")
    xmlstr="<?xml version='1.0'?>"
    xmlstr="<info>"
    xmlstr=xmlstr&"<receiverinfo>"
    xmlstr=xmlstr&"<name>"
    xmlstr=xmlstr&rs1("name")
    xmlstr=xmlstr&"</name>"
    xmlstr=xmlstr&"<province>"
    xmlstr=xmlstr&rs1("province")
    xmlstr=xmlstr&"</province>"
    xmlstr=xmlstr&"<city>"
    xmlstr=xmlstr&rs1("city")
    xmlstr=xmlstr&"</city>"
    xmlstr=xmlstr&"<address>"
    xmlstr=xmlstr&rs1("address")
    xmlstr=xmlstr&"</address>"
    xmlstr=xmlstr&"<postcode>"
    xmlstr=xmlstr&rs1("postcode")
    xmlstr=xmlstr&"</postcode>"
    xmlstr=xmlstr&"<telephonenum>"
    xmlstr=xmlstr&rs1("telephonenum")
    xmlstr=xmlstr&"</telephonenum>"
    xmlstr=xmlstr&"<pricesum>"
    xmlstr=xmlstr&rs1("pricesum")
    xmlstr=xmlstr&"</pricesum>"
    xmlstr=xmlstr&"<ordercode>"
    xmlstr=xmlstr&rs1("ordercode")
    xmlstr=xmlstr&"</ordercode>"
    rs1.close
    set rs1=nothing
    xmlstr=xmlstr&"</receiverinfo>"
    xmlstr=xmlstr&"<orderpic>"
    while not rs.eof     
            sourcename=app.path(name)
    sourcename=sourcename&"\"&"photos"&"\"&rs("picname")
            fso.copyfile sourcename, desname
    xmlstr=xmlstr&"<picinfo>"
        xmlstr=xmlstr&"<picname>"
    xmlstr=xmlstr&rs("picname")
    xmlstr=xmlstr&"</picname>"
    xmlstr=xmlstr&"<picnum>"
    xmlstr=xmlstr&rs("picnum")
    xmlstr=xmlstr&"</picnum>"
    xmlstr=xmlstr&"<flushsize>"
    xmlstr=xmlstr&rs("flushsize")
    xmlstr=xmlstr&"</flushsize>"
    xmlstr=xmlstr&"</picinfo>"
    'response.write sourcename&"<br>"
                rs.movenext
    wend
    xmlstr=xmlstr&"</orderpic>"
    xmlstr=xmlstr&"</info>"
    desname=desname&ordercode&".xml"
    set fsoorder=fso.CreateTextFile(desname, true, false)
    fsoorder.Write xmlstr
    fsoorder.close