天天看点

asp读取xml

< DOCTYPE html PUBLIC -WCDTD XHTML StrictEN httpwwwworgTRxhtmlDTDxhtml-strictdtd>

sysconfig.xml

<?xml version='1.0' encoding='UTF-8'?>

<config>

<uploadfilepath>upload</uploadfilepath>

</config>

UploadFilePathConfig.asp

<%

'*****************************************************************

'相关配置

'designed by shijiufeng on 2006-1-12

'email:[email protected]

function getUploadFilePath()

 dim node,Doc

 set Doc=CreateObject("Microsoft.XMLDOM")

 Doc.async=false

 Doc.load(Server.MapPath("sysconfig.xml")) 

 set node = Doc.getElementsByTagName_r("uploadfilepath")

 getUploadFilePath=node.item(0).Text

end function

'response.write getUploadFilePath()

%>

本文转自 netcorner 博客园博客,原文链接:http://www.cnblogs.com/netcorner/archive/2007/01/12/2912439.html  ,如需转载请自行联系原作者

继续阅读