In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly shows you "vbscript how to read the configuration file in xml format", the content is easy to understand, clear, hope to help you solve the doubt, the following let Xiaobian lead you to study and learn "vbscript how to read the configuration file in xml format" this article.
The copy code is as follows:
Class clsGetProfile
I don't know. I don't know what to do.
Private rootDoc
'The xml name is not the same as the first name.
'Exponent: "1" under the name NOT NULL
'There 's a lot of money.
Public Sub setProfile (strFileName)
Set data_xml = CreateObject ("Microsoft.XMLDOM")
Data_xml.async = False
Data_xml.load (strFileName)
Set rootDoc = data_xml.documentElement
End Sub
I don't know how to get my money.
'argument: "1" name NOT NULL
'2 'under the same name as NOT NULL
'' thank you.''I don't know what to do.
Public Function getItem (strSectionName, itemName)
Set sectionNode = rootDoc.selectSingleNode (strSectionName)
GetItem = sectionNode.selectSingleNode (itemName) .attributes (0) .nodeValue
End Function
End Class
'Use the following words.
'' I don't know. I don't know. I don't know what to do.
'Dim config: Set config = New clsGetProfile
'Configuring the name of the child, the name of the child, the name of the child.
'Call config.setProfile ("Config.xml")
"I don't know what to do," she said.
'WScript.Echo config.getItem ("MessageDefine", "INFO.001")
'WScript.Echo config.getItem ("MessageDefine", "INFO.003")
'WScript.Echo config.getItem ("MessageDefine", "ERROR.009")
'WScript.Echo config.getItem ("MessageDefine", "ERROR.012")
Class clsGetProfile
I don't know. I don't know what to do.
Private rootDoc
'The xml name is not the same as the first name.
'Exponent: "1" under the name NOT NULL
'There 's a lot of money.
Public Sub setProfile (strFileName)
Set data_xml = CreateObject ("Microsoft.XMLDOM")
Data_xml.async = False
Data_xml.load (strFileName)
Set rootDoc = data_xml.documentElement
End Sub
I don't know how to get my money.
'argument: "1" name NOT NULL
'2 'under the same name as NOT NULL
'' thank you.''I don't know what to do.
Public Function getItem (strSectionName, itemName)
Set sectionNode = rootDoc.selectSingleNode (strSectionName)
GetItem = sectionNode.selectSingleNode (itemName) .attributes (0) .nodeValue
End Function
End Class
'Use the following words.
'' I don't know. I don't know. I don't know what to do.
'Dim config: Set config = New clsGetProfile
'Configuring the name of the child, the name of the child, the name of the child.
'Call config.setProfile ("Config.xml")
"I don't know what to do," she said.
'WScript.Echo config.getItem ("MessageDefine", "INFO.001")
'WScript.Echo config.getItem ("MessageDefine", "INFO.003")
'WScript.Echo config.getItem ("MessageDefine", "ERROR.009")
'WScript.Echo config.getItem ("MessageDefine", "ERROR.012")
Configuration file format:
The copy code is as follows:
The above is all the contents of the article "how vbscript reads configuration files in xml format". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 255
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.