vbs类生成xml文件
来源:互联网 发布:淘宝手机端添加视频 编辑:程序博客网 时间:2024/04/28 05:16
有两文件:
objxml.asp:测试文件
clsxml.asp:vbs类文件
代码:
objxml.asp
<%@ Language=vbscript %>
<% Option Explicit %>
<!--#INCLUDE FILE="clsxml.asp"-->
<%
Dim objxml, strPath, str
Set objxml = New clsxml
strPath = Server.MapPath(".") & "/New.xml"
objxml.createFile strPath, "Root"
'Or If using an existing xml file:
'objxml.File = "C:/File.xml"
objxml.createRootChild "Images"
'Here only one attribute is added to the Images/Image Node
objxml.createChildNodeWAttr "Images", "Image", "id", "1"
objxml.updateField "Images//Image[@id=1]", "super.gif"
objxml.createRootNodeWAttr "Jobs", Array("Size", "Length", "Width"), _
Array(24, 31, 30)
objxml.createRootNodeWAttr "Jobs", Array("Size", "Length", "Width"), _
Array(24, 30, 29)
objxml.createRootNodeWAttr "Jobs", Array("Size", "Length", "Width"), _
Array(24, 31, 85)
'Notice that all three job nodes have size 24, all of those
'nodes will be updated
objxml.updateField "Jobs[@Size=24]", "24's"
'Notice that only two nodes have the specified XPath, hence
'only two new child nodes will be added
objxml.createChildNodeWAttr "Jobs[@Size=24 and @Length=31]", "Specs", _
Array("Wood", "Metal", "Color"), _
Array("Cedar", "Aluminum", "Green")
'It is always important to iterate through all of the nodes
'returned by this XPath query.
For Each str In objxml.getField("Jobs[@Size=24]")
Response.Write(str & "<br>")
Next
Set objxml = Nothing
- vbs类生成xml文件
- vbs类生成xml文件
- vbs类生成xml文件
- vbs类生成xml文件
- VBS 写XML 文件
- 统计文件信息及生成SQL语句(VBS)实例
- 字符串xml生成xml文件
- Java生成XML文件-封装类
- 通过类反射生成xml文件
- java生成xml文件
- dom4j生成xml文件
- c# 生成 xml 文件
- PHP 生成 XML文件
- C#生成XML文件
- C#生成XML文件
- TinyXML生成xml文件
- 生成一个xml文件
- StAX 生成XML文件
- XML简明教程(3)什么是XML数据岛
- XML简明教程(1)什么是XML元素
- Linux下通用线程池的创建与使用
- XML轻松学习手册(2)XML快速入门之三
- 程序员之路--梅花香自苦寒来!
- vbs类生成xml文件
- XML上传文件例子
- 用C#与XML创建动态分层菜单
- XML入门指南(6)XML确认
- 25中设计模式UML表示形式
- XML入门指南(5)XML属性
- XML入门指南(4)XML元素
- XML入门指南(3)XML语法
- XML入门指南(2)如何使用XML