兴国资源网 Design By www.nnzcdc.com
复制代码 代码如下:
'*****************************************************************
'** Script: getxmlelement.vbs
'** Version: 1.0
'** Created: 1/8/2009 10:58PM
'** Author: Adriaan Westra
'** E-mail:
'** Purpose / Comments:
'** Get an element from a xml file
'**
'**
'** Changelog :
'** 1/8/2009 10:58PM : Initial version
'**
'*****************************************************************
Dim objXML ' object to hold the xml document
Dim objNnode ' xml node object
'*****************************************************************
'** create the xml object
Set objXML = CreateObject("Msxml2.DOMDocument.6.0")
'*****************************************************************
'** Load the xml from file
objXML.load("album.xml")
'*****************************************************************
'** Set language for finding information to XPath
objXML.setProperty "SelectionLanguage", "XPath"
'*****************************************************************
'** Get a reference to the node
Set objNode = objXML.selectSingleNode("/album/DSC_2710/title")
'*****************************************************************
'** Output the requested text
wscript.echo "Title : " & objNode.text
The sample xml file used by the script :
复制代码 代码如下:
<?xml version="1.0"?>
<album>
<title>Bloemen</title>
<DSC_2710>
<alt>Pioenroos</alt>
<title>Pioenroos</title>
</DSC_2710>
<DSC_4777>
<alt>DSC_4777</alt>
<title>DSC_4777</title>
</DSC_4777>
<DSC_4787>
<alt>Vingerhoedskruid</alt>
<title>Vingerhoedskruid</title>
</DSC_4787>
<DSC_4899>
<alt>Lavendel</alt>
<title>Lavendel</title>
</DSC_4899>
<DSC_5003>
<alt>Zonnebloem</alt>
<title>Zonnebloem</title>
</DSC_5003>
</album>
'*****************************************************************
'** Script: getxmlelement.vbs
'** Version: 1.0
'** Created: 1/8/2009 10:58PM
'** Author: Adriaan Westra
'** E-mail:
'** Purpose / Comments:
'** Get an element from a xml file
'**
'**
'** Changelog :
'** 1/8/2009 10:58PM : Initial version
'**
'*****************************************************************
Dim objXML ' object to hold the xml document
Dim objNnode ' xml node object
'*****************************************************************
'** create the xml object
Set objXML = CreateObject("Msxml2.DOMDocument.6.0")
'*****************************************************************
'** Load the xml from file
objXML.load("album.xml")
'*****************************************************************
'** Set language for finding information to XPath
objXML.setProperty "SelectionLanguage", "XPath"
'*****************************************************************
'** Get a reference to the node
Set objNode = objXML.selectSingleNode("/album/DSC_2710/title")
'*****************************************************************
'** Output the requested text
wscript.echo "Title : " & objNode.text
The sample xml file used by the script :
复制代码 代码如下:
<?xml version="1.0"?>
<album>
<title>Bloemen</title>
<DSC_2710>
<alt>Pioenroos</alt>
<title>Pioenroos</title>
</DSC_2710>
<DSC_4777>
<alt>DSC_4777</alt>
<title>DSC_4777</title>
</DSC_4777>
<DSC_4787>
<alt>Vingerhoedskruid</alt>
<title>Vingerhoedskruid</title>
</DSC_4787>
<DSC_4899>
<alt>Lavendel</alt>
<title>Lavendel</title>
</DSC_4899>
<DSC_5003>
<alt>Zonnebloem</alt>
<title>Zonnebloem</title>
</DSC_5003>
</album>
兴国资源网 Design By www.nnzcdc.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
兴国资源网 Design By www.nnzcdc.com
暂无评论...
更新日志
2024年05月22日
2024年05月22日
- [In-Akustik7507]ReferenceSoundEdition-GreatMenOfSong(2015)HQCD[WAV+CUE]
- 睡得晚起得早可乐当饭 49岁男子6年6次心梗
- 研究发现走路快的人天生寿命更长:身体年轻16岁!
- 东野圭吾改编新片《彷徨之刃》豆瓣6.6:寡淡又平庸
- 《DJ歌曲合集》[320K/MP3][50.8G]
- 《孙燕姿10CD合集》[WAV分轨][4.8G]
- 周慧敏《纯爱传说》[APE+CUE][387M]
- 真妮.1995-紫色的玫瑰【波丽佳音】【WAV+CUE】
- 陶莉萍2006-异想陶花园【华纳】【WAV+CUE】
- 陈淑萍.2012-等呀等【美华】【WAV+CUE】
- 莫镇贤.1992-ImCrying【乐意唱片】【FLAC分轨】
- 娃娃.2011-曙光【福茂】【WAV+CUE】
- 群星.1998-水晶之恋【新时代】【WAV+CUE】
- 世界公认爵士发烧碟《Saint Mic 聖咪 UHQCD》 原装正版 [FLAC+CUE][383M]
- 群星《瑞鸣十五周年纪念》3CD[FLAC][676M]