xml的资源文件 catalog.xml catalog_html.xsl
catalog_wap.xsl
index.asp <% liulanqi=request.ServerVariables("HTTP_User-Agent") if Instr(liulanqi,"Mozilla")<>0 then xls_use="catalog_html.xsl" else xls_use="catalog_wap.xsl" Response.ContentType = "text/vnd.wap.wml" response.Write("") response.Write("")" target="_blank">http://www.wapforum.org/DTD/wml_1.1.xml'>") end if 'Load the XML set xml = Server.CreateObject("Microsoft.XMLDOM") xml.async = false xml.load(Server.MapPath("catalog.xml")) 'Load the XSL set xsl = Server.CreateObject("Microsoft.XMLDOM") xsl.async = false xsl.load(Server.MapPath(xls_use)) 'Transform the file Response.Write(xml.transformNode(xsl)) %> 以上文件为以前学习xml后,学着编写的适合ie浏览器和手机、wap模拟器访问演示的程序代码,根据不同的设备生成两种代码。 希望大家提意见:以更好开发xml的多平台应用。 | ||||
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/10294527/viewspace-125307/ ,如需转载,请注明出处,否则将追究法律责任。