好久没做asp了,这个天都在做asp,今天做asp操作xml,找了些资料才做出来
来源:互联网 发布:杯子知乎 编辑:程序博客网 时间:2024/05/01 05:38
function domainfind()
'----------------------------------------domain
dim yumingarr
yumingarr=Array(".com",".cn",".net",".com.cn",".gov",".tel",".中文.com",".中文.cn",".cc",".中文.cc",".info",".tw",".中文.tw",".asia",".hk",".us",".中文.org",".mobi",".io",".gov.cn",".it",".me",".tv",".biz",".中文.biz",".bz",".co",".中文.hk")
set xmldom=server.CreateObject("MSXML2.DOMDocument")
set xmlroot=xmldom.createElement("records")
xmldom.documentElement=xmlroot
for i=0 to Ubound(yumingarr)
sql="select *******"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
if not rs.eof then
do while not rs.eof
set childitem=xmldom.createElement("record")
set childnode=xmldom.createElement("pcode")
childnode.text=rs("***")
childitem.appendChild(childnode)
set childnode=xmldom.createElement("pname")
childnode.text=rs("***")
childitem.appendChild(childnode)
set childnode=xmldom.createElement("domainext")
childnode.text=rs("***")
childitem.appendChild(childnode)
set childnode=xmldom.createElement("price1")
childnode.text=rs("***")
childitem.appendChild(childnode)
set childnode=xmldom.createElement("ptime")
childnode.text=date()
childitem.appendChild(childnode)
xmlroot.appendChild(childitem)
rs.movenext
loop
rs.close
set childnode=nothing
set childitem=nothing
set rs=nothing
end if
next
xmldom.save(Server.MapPath("xml/domain.xml"))
set xmldom=nothing
set xmlroot=nothing
end function
读取xml数据
function readxml()
jgarr=""
set xmldom=server.CreateObject("Microsoft.XMLDOM")
xmldom.async = false
xmldom.ValidateOnParse=false
xmldom.Load(Server.MapPath("xml/domain.xml"))
set xmlroot=xmldom.documentElement
xmlitems=xmlroot.ChildNodes.length-1
Set item=xmldom.getElementsByTagName("record")
set ptime=xmldom.getElementsByTagName("ptime")
For i=0 To (item.Length-1)
set pcode=item.Item(i).getElementsByTagName("pcode")
set pname=item.Item(i).getElementsByTagName("pname")
set domainext=item.Item(i).getElementsByTagName("domainext")
set price1=item.Item(i).getElementsByTagName("price1")
'set ptime=item.Item(i).getElementsByTagName("ptime")
if jgarr="" then
jgarr=pcode.item(0).text&"%#fied!&"&pname.item(0).text&"%#fied!&"&domainext.item(0).text&"%#fied!&"&price1.item(0).text
else
jgarr=jgarr&"%#item!&"&pcode.item(0).text&"%#fied!&"&pname.item(0).text&"%#fied!&"&domainext.item(0).text&"%#fied!&"&price1.item(0).text
end if
Next
jgarr=jgarr&"%#ptime!&"&ptime.item(0).text
set xmldom=nothing
set xmlroot=nothing
set item=nothing
set pcode=nothing
set pname=nothing
set domainext=nothing
set price1=nothing
set ptime=nothing
readxml=jgarr
end function
- 好久没做asp了,这个天都在做asp,今天做asp操作xml,找了些资料才做出来
- 8皇后问题---好久没做这个了。练练手。
- 今天看书用ASP.NET做了个聊天室!
- 今天做asp和js交互,不是很熟悉js,所以弄了好久,这里记录下
- 蘑菇阵 使用路径数计算,想了好久没想出来,看答案才知道使用DP做的
- 终于做了一个用asp做了一个form!
- HDOJ_1004这个题做了好久
- 好久不做asp了,现在做个小站,把开发过程中的要点记录下来
- DOM解析好久没做了 都忘了解析是什么
- 做asp
- 有日子没来了,今天把以前用海阔天空这个名称在另一个博客上的一些记忆放上来做个记录
- 这个五月我都做了什么
- 今天做了一个ASP计数器,放出源码吧,挺简单的!
- 今天无事,做了一个Jsp或asp.Net的预编译工具...
- 瞧瞧 这个男孩 都做了些什么!
- 今天做了什么?
- 今天做了酸菜鱼。
- 今天做了什么?
- chapter11 separate Compilition and Namespaces(part1)
- android模拟器按键对应的键盘按键
- 改错题_102
- 在嵌入式Linux系统(OK6410)中移植Boa 服务器
- Luasocket 服务器,客户端简单实例
- 好久没做asp了,这个天都在做asp,今天做asp操作xml,找了些资料才做出来
- 改错题_103
- poj 3253 Fence Repair(Huffman问题,优先队列priority_queue)
- iOS图片拉伸技巧—— resizableImageWithCapInsets
- Linux 学习笔记 -- 第二部分 Linux 文件、目录与磁盘格式 -- 第8章 Linux 磁盘与文件系统管理
- 用maven命令导入项目到svn服务器
- 改错题_105
- c笔记——字符串处理
- 针对90后新生代Ifchange教你如何做招聘